End-cloud collaborative urban road condition updating method based on Occ and SLAM
By combining Occ and SLAM technology, depth estimation and DBSCAN clustering functions are used to solve the problem of positioning errors caused by changes in the size attributes of the same object in urban traffic updates, achieving more accurate object recognition and positioning, and improving the accuracy of urban traffic updates. .
Patent Information
- Application Number
- CN202410669919.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-09-17
AI Technical Summary
Existing urban traffic update methods have positioning error problems during high-frequency updates, especially ghosting problems caused by changes in size attributes of the same object in different frames of images, which affects positioning accuracy.
Using the device-cloud collaboration method based on Occ and SLAM, through the depth estimation network and DBSCAN clustering function, combined with GNSS and camera data, three-dimensional semantic occupancy prediction and object recognition are performed, and the size coordinate attribute iterative formula is used for object relocation to reduce size attributes. Positioning errors caused by changes.
Effectively identify and remove noise, improve the accuracy of object recognition, avoid positioning errors and ghosting problems, and improve the accuracy of urban traffic update.
Smart Images

Figure CN118658293A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of urban road condition technology, and in particular to an urban road condition updating method based on Occ and SLAM end-cloud collaboration. Background Art
[0002] In recent years, thanks to the development of route navigation and traffic navigation algorithms, the functions of navigation software have become increasingly complete, saving commuting time while also providing convenience for travel.
[0003] However, there is a lag in the navigation process or misleading information that causes the navigation to make wrong decisions; this is because navigation planning relies on prerequisite data such as traffic flow, navigation maps or high-precision maps, and the map update cycle is too long to provide real-time and effective data for urban navigation tasks. At the same time, the traffic flow calculation algorithm based on vehicle-mounted GPS and road cameras still has blind spots.
[0004] In the field of autonomous driving and robotics, SLAM technology plays a vital role. SLAM technology allows robots or autonomous vehicles to navigate in unknown environments by building a 3D map of the environment in real time and locating their own position.
[0005] On the other hand, Occupancy Networks technology assists autonomous driving systems by predicting the occupancy state and semantic category of each voxel in 3D voxel space; the main application of Occupancy Networks in the field of autonomous driving is the perception of dynamic and static obstacles, and the completion of 3D detection and modeling with the help of BEV space; this technology can better assist autonomous driving systems in perceiving drivable space by representing the environment through geometric perception, and it also has good recognition effects on objects with irregular shapes or unclear semantics.
[0006] Although SLAM technology and Occupancy Networks technology have been widely used in the fields of autonomous driving and robotics, there are few application cases in the fields of urban road condition updates and traffic management. At the same time, considering that when different frames of images are collected during urban road condition updates, the size attribute parameters of the object may change when the same object is recognized. At this time, if the size attribute parameters of the object are applied to the urban road condition map, it will cause positioning errors and the same object will have ghosting problems. Summary of the invention
[0007] In view of the shortcomings of the existing methods, the present invention proposes a method for updating urban road conditions and solves the problem of positioning errors of the same objects when the road conditions are updated at a high frequency.
[0008] The technical solution adopted by the present invention is: a method for updating urban road conditions based on end-cloud collaboration of Occ and SLAM comprises the following steps:
[0009] Step 1: Combine the camera intrinsic parameter matrix to obtain the projection matrix of each frame and parse the GNSS data;
[0010] As a preferred implementation of the present invention, the GNSS data is parsed to obtain the longitude, latitude, altitude, horizontal precision factor and the number of satellites resolved in real time at a certain moment.
[0011] Step 2: Use the depth estimation network to obtain the coordinates and depth value of each pixel in the image; combine the projection matrix of the current frame to project the depth map into the 3D point cloud space to obtain the point cloud; project the point cloud into the voxel grid, halve the voxel grid resolution, and obtain the number of occupied grids to form a candidate voxel query set; extract the features of a certain frame image, use the deformable attention operator to perform deformable interactive enhancement on the features of the candidate voxel query set and a certain frame image, and output the 3D semantic occupancy prediction result;
[0012] As a preferred implementation of the present invention, the depth estimation network is MobileStereoNet.
[0013] As a preferred implementation of the present invention, a ResNet50 network is used to extract features of a frame image.
[0014] Step 3: Read the latitude and longitude coordinates of the vehicle at the same time and the prediction accuracy of each semantics through the timestamp, use the DBSCAN clustering function to identify different objects, and identify objects and noise based on the minimum number of voxels;
[0015] As a preferred embodiment of the present invention, the DBSCAN clustering function identifies different objects including:
[0016] Aggregate several point clouds into different objects;
[0017] Set classification thresholds for different objects;
[0018] The voxels of the three-dimensional semantic occupancy prediction results of the object are obtained. When the straight-line distance between two voxels is greater than the classification threshold, they are the same object, otherwise they are different objects.
[0019] As a preferred embodiment of the present invention, identifying objects and noises according to the minimum number of voxels includes:
[0020] Set the minimum number of voxels for different objects. When the number of voxel grids occupied by clustered objects is less than the minimum number of voxels, it is considered noise.
[0021] Step 4: compare the confidence of the same object in two consecutive frames, and use the size coordinate attribute iteration formula to obtain the size coordinate attribute of the same object after relocation;
[0022] As a preferred embodiment of the present invention, the dimension coordinate attribute iteration formula is:
[0023]
[0024] in, and Respectively represent the longitude, latitude, length, width and height of the relocated object, L t , A t , X t , Y t and H t Respectively represent the longitude, latitude, length, width and height of the object in the current frame, L t-1 , A t-1 , X t-1 , Y t-1 and H t-1 They represent the longitude, latitude, length, width and height of the object in the previous frame, k is the relocation weight, q t and q t-1 Represent the overall confidence of the object in the current frame and the previous frame respectively.
[0025] As a preferred embodiment of the present invention, an urban road condition update system based on end-cloud collaboration of Occ and SLAM includes: a memory for storing instructions executable by a processor; a processor for executing instructions to implement an urban road condition update method based on end-cloud collaboration of Occ and SLAM.
[0026] As a preferred embodiment of the present invention, a computer-readable medium stores a computer program code, and when the computer program code is executed by a processor, a method for updating urban road conditions based on end-cloud collaboration of Occ and SLAM is implemented.
[0027] Beneficial effects of the present invention:
[0028] 1. The present invention uses the DBSCAN clustering function to identify different objects, and determines whether they are the same object by judging the straight-line distance between the voxels of the object; and uses the minimum number of voxels to remove noise;
[0029] 2. Construct a size attribute positioning formula and combine it with the confidence level of the object to achieve object relocation, so as to avoid ghosting problems in map projection caused by changes in the size attributes of the same object in multiple frames, which will affect the positioning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a flow chart of the urban road condition updating method based on Occ and SLAM end-cloud collaboration of the present invention;
[0031] Figure 2is a sample image of the semanticKITTI dataset of the present invention;
[0032] Figure 3 The present invention is Figure 2 The point cloud image obtained after depth estimation and projection matrix projection;
[0033] Figure 4 The present invention is Figure 2 The three-dimensional semantic occupancy map obtained after processing by the perception module;
[0034] Figure 5 (a) and (b) are Figure 4 The effect of clustering cars and buildings semantics using the DBSCAN algorithm. DETAILED DESCRIPTION
[0035] The present invention is further described below in conjunction with the accompanying drawings and embodiments. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore it only shows the components related to the present invention.
[0036] like Figure 1 As shown, the urban road condition update method based on Occ and SLAM end-cloud collaboration includes the following steps:
[0037] Construct the positioning module, perception module and post-processing module respectively.
[0038] The hardware structure of the positioning module consists of a combined navigation module SKM2305NDR-40MXT and a VI sensor ZED2.
[0039] Step 1: Use the camera intrinsic parameter matrix to obtain the projection matrix of the initial frame and parse the GNSS data;
[0040] First, set the camera coordinate system to the vehicle coordinate system;
[0041] Secondly, couple VIO and GNSS, combining VINS-Mono and VINS-Fusion;
[0042] Since the monocular inertial odometry of VINS-Mono is more robust than the binocular odometry of VINS-Fusion, the VIO part of the positioning module is composed of the front end of VINS-Mono; the part that fused VIO and GNSS is taken from the back end of VINS-Fusion.
[0043] Input t in the positioning module i The monocular image captured by the ZED2 camera and the message of the IMU sensor, namely the linear acceleration and angular velocity; parse the NMEA protocol data returned by the GNSS module to obtain t iThe longitude, latitude, altitude, horizontal precision factor and number of satellites solved in real time at the moment. The GNSS system uses SKM2305NDR-40MXT; the VINS-Fusion backend outputs t i The camera projection matrix at this moment relative to the initial frame and longitude and latitude positioning information; i Camera projection matrix at this moment The input perception module projects the depth image into a 3D point cloud; the longitude and latitude positioning information is used for road network matching in the client processing flow. Figure 2 is a sample image of the semanticKITTI dataset.
[0044] The NMEA protocol data input by GNSS is read through ROS, the GNGGA sentences are parsed, the latitude and longitude information is obtained, the number of satellites and the HDOP horizontal precision factor are calculated, the data is stamped with a Unix timestamp, and then a message is published; at the same time, the host computer also reads the image of the ZED2 camera, saves each frame of the image locally and stamps it with a Unix timestamp; when the GNSS system and the VIO system are integrated, by comparing the timestamps of each frame of data of the two systems, when the timestamp difference is less than the threshold, the optimization algorithm of GNSS and VIO is executed. The optimization algorithm uses nonlinear least squares method to make the camera posture and longitude and latitude information more accurate.
[0045] By reading the messages from the IMU sensor and the images from the binocular camera, feature point tracking, IMU pre-integration and system initialization are performed, and the external parameter matrix at the time of initialization completion is saved. Combined with the ZED2 camera internal parameter matrix K0, the projection matrix of the initial frame is obtained The formula is:
[0046]
[0047] The sliding window method is used to optimize the posture and build a stable VIO system. ROS reads GNSS data, aligns the timestamp of the GNSS data with VIO, and removes data with timestamps that differ by more than a threshold. After the timestamps are aligned, unqualified GNSS data is removed by settling the number of satellites. Qualified GNSS data is converted to the camera coordinate system and optimized with the VIO system. The optimization corrects the historical trajectory within the sliding window. In order to obtain stable positioning information, the data that has been optimized and has slid out of the sliding window is converted back to the longitude and latitude coordinate system to obtain the absolute coordinates of the vehicle.
[0048] Step 2: Use the depth estimation network to obtain the coordinates and depth value of each pixel in the image; combine the projection matrix of the current frame to project the depth map into the 3D point cloud space to obtain the point cloud; project the point cloud into the voxel grid, and halve the resolution of the voxel grid to obtain the number of occupied grids to form a candidate voxel query set; extract the features of a certain frame image, use the deformable attention operator to perform deformable interactive enhancement on the features of the candidate voxel query set and a certain frame image, and output the 3D semantic occupancy prediction result;
[0049] Perception module input t i Stereo image and projection matrix at each moment Output a 3D semantic occupancy grid where H×W×Z is the resolution of the 3D occupancy grid and C is the number of semantic categories.
[0050] Two stages are used to complete O out In the first stage, the pre-trained depth estimation network MobileStereoNet is used to predict the depth of the binocular image and obtain the depth value z of each pixel coordinate (u, v) in the image. u,v ; Then combine the projection matrix of the current frame Project the depth map into the 3D point cloud space to get the point cloud
[0051]
[0052] Among them, (c u ,c v ) is the center coordinate of the image, f u and f v They are the horizontal and vertical focal lengths of the camera respectively.
[0053] like Figure 3 according to Figure 2 The depth map is projected into the 3D point cloud space to obtain a point cloud image schematic diagram; Figure 4 is to use Figure 2 The resulting 3D semantic occupancy map.
[0054] Then the point cloud Projected onto a voxel grid M0∈{0,1} H×W×Z Specifically, as long as there is a point cloud in the grid under M0, the grid is considered occupied; then M0 is input to a UNet network with a 2D backbone network and a 3D semantic head, so that the grid M1∈{0,1} h×w×z The resolution of the image is halved; the space with halved resolution can correct the occupancy prediction error caused by the depth estimation error to a certain extent, making the whole system more robust and also reducing the amount of calculation and video memory usage.
[0055] Let the number of occupied grids in M1 be N q , N q grids are selected to form a candidate voxel query set Among them, each independent voxel query is denoted as q p,i ,q p,i ∈Q p .
[0056] In the second stage, the ResNet50 network is first used to extract the features of N frames of images. Where m×n is the two-dimensional size of the feature, and d is the dimension of the feature; in order to facilitate subsequent processing, the dimension d is consistent with the candidate voxel query set Q p In order to further learn the visible features of the 3D scene to optimize the geometric representation of the scene, a deformable attention operator is used to p and Perform deformable interactive enhancements;
[0057] Specifically, we obtain each q based on the resolution h×w×z of the grid M1 and the size of the three-dimensional space. p,i The real coordinates (x, y, z) are then used to calculate the camera projection matrix The candidate query point is projected onto the deep feature plane of the image, and the successfully projected 2D point is used as the reference anchor point. The reference anchor point is used to sample the deep feature vector of the image, and then a deformable cross attention mechanism is performed to update the candidate voxel query set to because It is by Q p and By interacting with each other, we can find that both feature sets have a good description of the visible scene, while ignoring the invisible part behind the visible scene; therefore is an incomplete voxel grid feature set, which needs to be Add to the grid marked as occupied in M1 to get the initial complete voxel grid feature set The deformable self-attention mechanism is then used to obtain the optimized complete voxel set Finally, the upsampling operation is used to expand the feature space to H×W×Z, and then the three-dimensional semantic occupancy prediction result O is output. out .
[0058] Step 3: Read the latitude and longitude coordinates of the vehicle at the same time and the prediction accuracy of each semantics through the timestamp, use the DBSCAN clustering function to identify different objects, and identify objects and noise based on the minimum number of voxels;
[0059] The post-processing module outputs the perception results of each frame of the image in the form of a binary file. In order to facilitate client processing, five attributes are used to describe the recognition target, such as buildings, cars, etc. The five attributes are confidence, semantic labels, longitude and latitude coordinates, coordinates relative to the vehicle, and size. In the post-processing module, the program reads the prediction results of each frame. out , read the latitude and longitude coordinates of the vehicle at the same time and the prediction accuracy of each semantic through the timestamp; then remove the empty point cloud according to the prediction value; classify each frame of point cloud based on semantic information and store them in different lists, that is, each list represents all point clouds of a certain type of object in the current frame; for different types of lists, use Open3D's DBSCAN clustering function. Due to the existence of noise, the number of objects of each type in the scene is actually unknown, and the DBSCAN clustering algorithm can not only ignore the number of target clusters, but also aggregate multiple point clouds into different single objects Obj i , and some noise can be removed by setting density and minimum cluster size; according to experience, the classification threshold ε is set for different types of objects i and n p ; ε i Used to measure the prediction results out The two voxels v a ,v b Whether they belong to the same object, when v a ,v b The straight-line distance between them is greater than ε i , then it is believed that the two voxels do not belong to the same object; otherwise, it is believed that v a ,v b Belong to the same object; n p Indicates the minimum number of voxels in a single category formed by the aggregation of multiple voxels. For example, the minimum number of voxel grids occupied by cars is set to 25, so cluster targets with less than 25 voxels will be discarded and considered as noise. This is because there is a certain error in the prediction of Occ technology, and some fragmented erroneous prediction results will appear. p The indicator can eliminate these wrong prediction results; through ε i and n p , can effectively cluster different objects with the same semantics and remove noise; Figure 5 (a) and (b) are the effects of DBSCAN clustering of cars and buildings.
[0060] After clustering, point clouds corresponding to different objects of the same type are selected, and the center point coordinates and size of the point clouds are calculated. The center point coordinates are the relative coordinates of the ego-vehicle coordinate system, and the ego-vehicle longitude and latitude coordinates are converted into absolute coordinates. The prediction accuracy of the object is regarded as the confidence level according to the semantics, and is stored together with the relative coordinates, absolute coordinates, size and semantics as a dictionary, and converted into a binary file for storage. The first dictionary of the binary file is special, with only the ego-vehicle positioning data and the Unix timestamp of the current frame, while the subsequent dictionaries are all the attributes of each object in the scene.
[0061] Step 4: Compare the confidence of the same object in two consecutive frames, and use the size attribute positioning formula to obtain the relocated size attribute of the same object;
[0062] Since the same object may appear in multiple frames, and the prediction results of each frame of the perception module have certain errors, after clustering and coordinate conversion, the absolute coordinates and shapes of the same object between adjacent frames will deviate. For example, there is a deviation in the size and absolute coordinates of an object in two frames, resulting in a ghost image of the same object on the positioning map, affecting the accuracy of positioning. In order to solve this deviation problem; the present invention compares the overall confidence of the target object between the two frames, and the object with higher confidence will obtain a higher weight during relocation; at the same time, in order to save computing overhead, the size coordinate attributes of the object are directly calculated without comparing the confidence of specific voxels between the two frames one by one. The size coordinate attribute iteration formula is:
[0063]
[0064] in, and Respectively represent the longitude, latitude, length, width and height of the relocated object, L t , A t , X t , Y t and H t Respectively represent the longitude, latitude, length, width and height of the object in the current frame, L t-1 , A t-1 , X t-1 , Y t-1 and H t-1 They represent the longitude, latitude, length, width and height of the object in the previous frame, k is the relocation weight, q t and q t-1 Represent the overall confidence of the object in the current frame and the previous frame respectively.
[0065] Finally, the perception results are uploaded to the cloud for storage. Considering that the system is deployed for online car-hailing, a unique number is set for each terminal device so that the client can read the cloud data according to the number; the cloud notifies the client when new data arrives, and the client reads the new data on the cloud after receiving the message; the client first reads the coordinates of the vehicle in the dictionary. Since different map providers use different coordinate systems, it is necessary to call the map provider API to convert it to the coordinate system it uses, and then it can perform road network matching and locate it on a specific road; then read the attributes of subsequent objects, locate them on the road by longitude and latitude coordinates and display them with specific icons to simulate road conditions; among them, the three coordinates of relative coordinates, object size and semantics can be viewed by clicking on the icon; for the first frame of data, only the icon needs to be displayed, but the subsequent data frames still need to be compared; due to the multi-frame observation error of the same object, the objects between two adjacent frames will still have certain deviations in attributes even if they pass the data stabilization process. The present invention compares the confidence, retains objects with higher confidence, and eliminates objects with lower confidence, so as to eliminate multi-frame ghosting and reduce memory loss.
[0066] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A method for updating urban road conditions based on end-cloud collaboration of Occ and SLAM, characterized in that: The following steps are involved: Step 1: Combine the camera intrinsic parameter matrix to obtain the projection matrix of each frame and parse the GNSS data; Step 2: Use the depth estimation network to obtain the coordinates and depth value of each pixel in the image; combine the projection matrix of the current frame to project the depth map into the 3D point cloud space to obtain the point cloud; Project the point cloud to a voxel grid and halve the voxel grid resolution to obtain the number of occupied grids to form a candidate voxel query set; Extract the features of a certain frame image, use the deformable attention operator to perform deformable interactive enhancement on the candidate voxel query set and the features of a certain frame image, and output the 3D semantic occupancy prediction result; Step 3: Read the latitude and longitude coordinates of the vehicle at the same time and the prediction accuracy of each semantics through the timestamp, use the DBSCAN clustering function to identify different objects, and identify objects and noise based on the minimum number of voxels; Step 4: Compare the confidence of the same object in two consecutive frames, and use the size coordinate attribute iteration formula to obtain the size coordinate attributes of the same object after relocation.
2. The method for updating urban road conditions based on Occ and SLAM end-cloud collaboration according to claim 1 is characterized in that: The dimension coordinate attribute iteration formula is: in, and Respectively represent the longitude, latitude, length, width and height of the relocated object, L t , A t , X t , Y t and H t Respectively represent the longitude, latitude, length, width and height of the object in the current frame, L t-1 , A t-1 , X t-1 , Y t-1 and H t-1 They represent the longitude, latitude, length, width and height of the object in the previous frame, k is the relocation weight, q t and q t-1 Represent the overall confidence of the object in the current frame and the previous frame respectively.
3. The method for updating urban road conditions based on Occ and SLAM end-cloud collaboration according to claim 1 is characterized in that: The DBSCAN clustering function identifies different objects including: Aggregate several point clouds into different objects; Set classification thresholds for different objects; The voxels of the 3D semantic occupancy prediction results of the object are obtained. When the straight-line distance between two voxels is greater than the classification threshold, they are the same object, otherwise they are different objects.
4. The method for updating urban road conditions based on Occ and SLAM end-cloud collaboration according to claim 1 is characterized in that: Identification of objects and noise based on the minimum number of voxels includes: Set the minimum number of voxels for different objects. When the number of voxel grids occupied by clustered objects is less than the minimum number of voxels, it is considered noise.
5. The method for updating urban road conditions based on Occ and SLAM end-cloud collaboration according to claim 1 is characterized in that: Analyze the GNSS data to obtain the longitude, latitude, altitude, horizontal precision factor and number of satellites solved in real time at a certain moment.
6. The method for updating urban road conditions based on Occ and SLAM end-cloud collaboration according to claim 1 is characterized in that: The depth estimation network is MobileStereoNet.
7. The method for updating urban road conditions based on Occ and SLAM end-cloud collaboration according to claim 1 is characterized in that: The ResNet50 network is used to extract the features of a frame image.
8. The urban road condition update system based on Occ and SLAM end-cloud collaboration is characterized by: include: a memory for storing instructions executable by a processor; A processor, used to execute instructions to implement the urban road condition updating method based on Occ and SLAM end-cloud collaboration as described in any one of claims 1-7.
9. A computer readable medium storing a computer program code, characterized in that: When the computer program code is executed by a processor, the method for updating urban road conditions based on end-cloud collaboration of Occ and SLAM is implemented as described in any one of claims 1 to 7.
Citation Information
Cited By
Trailer motion prediction method and system based on two-dimensional occupancy graph, and medium
CN120080872A
Method for updating foresight real-time occupancy grid of auxiliary driving vehicle
CN120411915A
A real-time occupancy grid update method for forward-looking assisted driving vehicles
CN120411915B
Multi-modal target detection method based on enhanced virtual points and adaptive distance classification
CN121305040A
