Semantic map construction method and device
Through the data association and pixel matching technology of semantic maps, the problem of high cost of lidar solutions and insufficient real-time performance of visual solutions in semantic map construction is solved, and efficient and robust three-dimensional semantic map construction is achieved, which is suitable for autonomous vehicles. path planning.
Patent Information
- Application Number
- CN202310399171.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-04
- Publication Date
- 2024-10-15
AI Technical Summary
Among existing semantic map construction solutions, lidar-based solutions have problems such as high price, inconvenient installation, high power consumption, short lifespan, and difficulty in data fusion, while vision-based solutions have problems with insufficient real-time performance and robustness. , it is difficult to promote it on a large scale in autonomous driving.
By obtaining the map semantic element information in multi-frame images, we obtain the data association frame sequence corresponding to the map semantic elements, and use pixel point matching pairs to realize the three-dimensional reconstruction of the semantic elements, improve the real-time and robustness of the semantic map, and use the bounding box Similarity and Keep alive mechanisms are used for data association to ensure the continuity and accuracy of map semantic elements.
It achieves high real-time performance and robustness of semantic maps, improves the construction accuracy and reliability of three-dimensional semantic maps, and is suitable for path planning and environment modeling of autonomous vehicles.
Smart Images

Figure CN118776545A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of map construction technology, and in particular to a method and device for constructing a semantic map. Background Art
[0002] Semantic map construction can be applied to many fields, such as robots, mobile terminals, and vehicle autonomous driving. Especially when applied to vehicle autonomous driving, semantic map construction is of great significance for the real-time positioning, path planning, and speed specifications of vehicles. Depending on the sensor, the existing semantic map construction solutions can be divided into lidar-based semantic map construction solutions and vision-based semantic map construction solutions.
[0003] However, the solution of semantic map construction based on LiDAR has problems such as high price, inconvenient installation, high power consumption, short life and difficulty in data fusion, which makes it difficult to promote it on a large scale in autonomous driving. Most of the existing semantic map construction solutions based on vision have problems such as real-time and robustness of semantic map construction. Summary of the invention
[0004] The embodiments of the present application provide a method and device for constructing a semantic map, so as to improve the real-time performance and robustness of the semantic map construction.
[0005] In a first aspect, an embodiment of the present application provides a method for constructing a semantic map, comprising acquiring information of map semantic elements in multiple image frames; obtaining a data-associated frame sequence corresponding to the map semantic elements, wherein the images in the data-associated frame sequence include the map semantic elements; obtaining pixel point matching pairs of the map semantic elements in a first image frame and a second image frame, wherein the first image frame and the second image frame are image frames in the data-associated frame sequence; obtaining spatial position information of the map semantic elements based on the pixel point matching pairs, the camera pose corresponding to the first image frame and the camera pose corresponding to the second image frame; and constructing a three-dimensional semantic map based on the spatial position information of the map semantic elements.
[0006] The method for constructing a semantic map provided in an embodiment of the present application obtains a data association frame sequence corresponding to each map semantic element through data association, and then matches pixel points (also referred to as common points) in the data association frame sequence for the map semantic element to obtain pixel point matching pairs, and uses the pixel point matching pairs to achieve three-dimensional reconstruction of the semantic elements, thereby achieving three-dimensional reconstruction of a semantic map without feature points, thereby improving the real-time and robustness of semantic map construction.
[0007] In a possible implementation, a data-associated frame sequence corresponding to a map semantic element is obtained, including obtaining a bounding box (Bbox) of the map semantic element in each frame of a plurality of images; for each map semantic element, inter-frame matching is performed based on the bounding box, and the image frames with successful matching are used as the data-associated frame sequence corresponding to the map semantic element; wherein the similarity of the bounding boxes of the map semantic elements between the successfully matched image frames is greater than a preset threshold.
[0008] In this possible implementation, the image frames having a data association relationship with the map semantic element are determined by using the similarity of the bounding boxes of the map semantic element between different image frames. For example, image frames whose bounding box similarity between different image frames of the map semantic element is greater than or equal to a preset threshold are determined as image frames associated with the map semantic element. The meaning of having a data association relationship here can be understood as image frames containing the same map semantic element having a data association relationship.
[0009] In order to facilitate the calculation of the similarity of the bounding boxes of map semantic elements, the bounding boxes that do not meet the preset conditions are preprocessed. For example, the edge contours of map semantic elements whose areas are smaller than the threshold T1 or whose aspect ratios of the edge contours are larger than the threshold T2 are subjected to bounding box relaxation operations (Bbox relaxation) to obtain the bounding box of the map semantic element.
[0010] In another possible implementation, the similarity of bounding boxes of map semantic elements between image frames is positively correlated with the intersection-over-union ratio of bounding boxes of map semantic elements between image frames, and negatively correlated with the distance of bounding boxes of map semantic elements between image frames.
[0011] For example, the bounding box positions of all map semantic elements in the previous frame are mapped to the current frame, and the Bbox intersection over union (Bbox IOU) of each matching pair is calculated according to the map semantic element category in the current frame, and multiplied by the IOU similarity factor Ki to obtain the IOU similarity Si of each matching pair; and the inverse 1 / d of the distance between the Bbox vertices of all map semantic elements in the previous frame and the Bbox vertices of all map semantic elements of the same category in the current frame is calculated, and multiplied by the vertex distance similarity factor Kd (where Ki+Kd=1) to obtain the vertex distance similarity Sd of each matching pair. The similarity (Si+Sd) of each matching pair is calculated, and when the maximum similarity Smax of the matching pair is >Ts, the map semantic element of the previous frame is data associated in the current frame. Otherwise, the map semantic element is not data associated.
[0012] Optionally, Ki and Kd are preset according to empirical values, for example, Ki is set to 0.7 and Kd is set to 0.3, so that BboxIOU is more critical in the calculation of similarity.
[0013] In the process of map semantic element extraction, missed detection may occur, that is, a map semantic element (such as a street lamp) is not extracted, which will lead to data association interruption. When the same map semantic element (such as a street lamp) is detected again in a new frame of image, due to the interruption of association in the previous frame, it will be considered that another independently observed object is generated, which will lead to erroneous reconstruction.
[0014] To address this, in the method for constructing a semantic map provided in an embodiment of the present application, a keep alive mechanism for map semantic elements is proposed, that is, based on the keep alive mechanism, a data-associated frame sequence corresponding to the map semantic elements is determined from multiple frame images.
[0015] For example, for a certain map semantic element, if the tracking is interrupted at time t+1, its Bbox at time t is mapped to time t+2. If it is associated at time t+2, the association of the map semantic element will continue to be performed for the next frame. Otherwise, the association sequence of the map semantic element ends at the image frame corresponding to time t.
[0016] In another possible implementation, in order to improve the accuracy of determining the spatial position information of the map semantic element (also referred to as the three-dimensional reconstruction of the map semantic element), it is necessary to ensure the quality of the image frame pair, that is, to select two image frames with the best quality from the data-associated frames of each map semantic element as a key frame pair. The determination of the key frame pair is related to the integrity factor of the map semantic element in the image frame (which can be referred to as the integrity factor of the semantic element), the disparity factor between different image frames of the map semantic element (which can be referred to as the disparity factor), and the camera pose accuracy (which can be referred to as the pose accuracy) corresponding to the image frame where the map semantic element is located. Therefore, the key frame pair can be determined from the data-associated frame sequence corresponding to the map semantic element according to the integrity factor, disparity factor and pose accuracy factor of the semantic element.
[0017] For example, for any map semantic element, when extracting a key frame pair, the first frame image is first extracted in reverse order from the data-associated frame sequence of the map semantic element according to the map semantic element completeness factor, and the second frame image is obtained based on the maximum value of the sum of the three factors: completeness factor, parallax factor and posture accuracy.
[0018] In another possible implementation, pixel matching pairs of map semantic elements in the first image frame and the second image frame are obtained, including: collecting N first pixel points along the edge contour of each map semantic element from the first image frame, where N is a positive integer greater than 1; determining a basic matrix of epipolar geometry based on a camera pose corresponding to the first image frame, a camera pose corresponding to the second image frame, and an intrinsic parameter of the camera; determining N epipolar line mappings of the N first pixel points on the second frame image based on the basic matrix of epipolar geometry; determining N second pixel points based on N intersection points of the N epipolar line mappings and the edge contour of the map semantic element in the second image frame; and determining pixel matching pairs of the map semantic elements in the image frame pair based on the N first pixel points and the N second pixel points.
[0019] In this possible implementation, a number of pixel points are collected along the edge contour of the map semantic element in the image frame. For example, N pixel points are uniformly sampled on the edge contour of the map semantic element in the first image frame (for example, the contour center of the map semantic element is taken as the ray endpoint, and the set of intersection points of the ray clusters with an interval of 360 / N degrees and the contour is N pixel points). N matching pairs are obtained by matching the N pixel points with the second image frame, and then the N matching pairs are used to perform three-dimensional reconstruction of the map semantic element, thereby realizing sparse reconstruction of the map semantic element and increasing the real-time performance of three-dimensional semantic map construction.
[0020] In order to further improve the accuracy of three-dimensional semantic map construction, the semantic map construction method provided in the embodiment of the present application, after constructing the three-dimensional semantic map based on the spatial position information of each map semantic element, also includes a step of optimizing the position of the map semantic elements, for example, constructing a map semantic element error map, the map semantic element error map indicating the error information of the map semantic elements reprojected from the three-dimensional semantic map to each image frame of the data association frame corresponding to the map semantic elements; based on the map semantic element error map, adjusting the spatial position information of the map semantic elements, and optimizing the constructed three-dimensional semantic map based on the adjusted spatial position information of the map semantic elements.
[0021] In a second aspect, an embodiment of the present application also provides a vehicle route planning method, comprising constructing a three-dimensional semantic map of the vehicle's surroundings based on the method described in the first aspect, and planning the vehicle's route based on the three-dimensional semantic map.
[0022] In the third aspect, an embodiment of the present application also provides a semantic map construction device including: an acquisition module, a data association module, a matching module, a determination module and a construction module, wherein the acquisition module is used to acquire information of map semantic elements in multiple frames of images; the data association module is used to obtain a data association frame sequence corresponding to the map semantic elements, and the images in the data association frame sequence include the map semantic elements; the matching module is used to obtain pixel point matching pairs of the map semantic elements in the first image frame and the second image frame, and the first image frame and the second image frame are image frames in the data association frame sequence; the determination module is used to obtain the spatial position information of the map semantic elements based on the pixel point matching pairs, the camera posture corresponding to the first image frame and the camera posture corresponding to the second image frame; the construction module is used to construct a three-dimensional semantic map based on the spatial position information of the map semantic elements.
[0023] In a possible implementation, the data association module is specifically used to: obtain the bounding box of the map semantic element in each frame of multiple frames; for each map semantic element, based on the bounding box, perform inter-frame matching, and use the successfully matched image frames as the data association frame sequence corresponding to the map semantic element; wherein the similarity of the bounding boxes of the map semantic elements between the successfully matched image frames is greater than a preset threshold.
[0024] In another possible implementation, the data association module is further used to: obtain the edge contour of the map semantic element in each frame of the multiple frames; for the edge contour of the map semantic element in each frame, if the edge contour meets the preset conditions, relax the edge contour, and determine the bounding box of the map semantic element based on the edge contour after the relaxation operation; the preset conditions include that the area of the edge contour is less than or equal to a first threshold or the aspect ratio of the edge contour is greater than or equal to a second threshold; if the edge contour does not meet the preset conditions, determine the bounding box of the map semantic element based on the edge contour.
[0025] In another possible implementation, the similarity of bounding boxes of map semantic elements between image frames is positively correlated with the intersection-over-union ratio of bounding boxes of map semantic elements between image frames, and negatively correlated with the distance of bounding boxes of map semantic elements between image frames.
[0026] In another possible implementation, the data association module is further used to determine the data association frame sequence corresponding to the map semantic element from the multiple frames of images based on the keep alive mechanism.
[0027] In another possible implementation, the first image frame and the second image frame are determined from a data-associated frame sequence corresponding to the map semantic element based on one or more of a completeness factor of the map semantic element in the image frame, a disparity factor of the map semantic element between different image frames, and a camera pose accuracy corresponding to the image frame where the map semantic element is located.
[0028] In another possible implementation, the matching module is specifically used to: collect N first pixel points along the edge contour of the map semantic element from the first image frame, where N is a positive integer greater than 1; determine the basic matrix of epipolar geometry based on the camera pose corresponding to the first image frame, the camera pose corresponding to the second image frame, and the camera's intrinsic parameters; determine N epipolar line mappings of the N first pixel points on the second frame image based on the basic matrix of epipolar geometry; determine N second pixel points based on the N intersection points of the N epipolar line mappings and the edge contour of the map semantic element in the second image frame; and determine pixel point matching pairs of the map semantic element in the image frame pair based on the N first pixel points and the N second pixel points.
[0029] In another possible implementation, the semantic map construction device provided by the embodiment of the present application also includes an optimization module, which is used to adjust the spatial position information of the map semantic elements based on the error map corresponding to the map semantic elements; wherein the error map corresponding to the map semantic elements indicates the error information of the map semantic elements reprojected from the three-dimensional semantic map to each image frame of the data association frame corresponding to the map semantic elements; based on the adjusted spatial position information of the map semantic elements, the three-dimensional semantic map is adjusted.
[0030] In a fourth aspect, an embodiment of the present application further provides a vehicle, comprising a device for constructing a semantic map as described in any possible implementation of the third aspect.
[0031] In a fifth aspect, the present application provides a computing device, including a memory and a processor, wherein instructions are stored in the memory, and when the instructions are executed by the processor, the method described in the first aspect and / or the second aspect is implemented.
[0032] In a sixth aspect, the present application provides a computer storage medium, comprising computer instructions, which, when executed by a processor, enable the method described in the first aspect and / or the second aspect to be implemented.
[0033] In a seventh aspect, the present application provides a computer program or a computer program product, wherein the computer program or the computer program product comprises instructions, which, when executed, cause a computer to execute the method described in the first aspect and / or the second aspect.
[0034] Based on the implementations provided in the above aspects, the present application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A system architecture diagram of a semantic map construction device provided in an embodiment of the present application;
[0036] Figure 2A flowchart of a method for constructing a semantic map provided in an embodiment of the present application;
[0037] Figure 3 It shows the mapping of the Bbox of the street light pole in the previous frame to the current frame and the IOU with the Bbox of the street light pole in the current frame;
[0038] Figure 4 It shows the vertex distance between the Bbox of the street light pole in the previous frame mapped to the current frame and the Bbox of the street light pole in the current frame;
[0039] Figure 5 A schematic diagram of a keep alive mechanism for tracking map semantic elements;
[0040] Figure 6a is a schematic diagram of the integrity factor of a street light pole in an image frame;
[0041] Figure 6b is a schematic diagram of the integrity factor of the street light pole in another image frame;
[0042] Figure 7 Schematic diagram of the disparity of the same observation point in different image frames;
[0043] Figure 8 A schematic diagram of the pose accuracy corresponding to the candidate image frames is shown;
[0044] Fig. 9 A schematic diagram of constructing a universal point matching pair based on epipolar mapping is shown;
[0045] Fig.10 A schematic diagram of fitting a point cloud of a linear object and a schematic diagram of fitting a point cloud of a planar object are shown;
[0046] Fig.11 The result of semantic association between the pole and the card constructed by association of map semantic elements in the method for constructing a semantic map provided by an embodiment of the present application is shown;
[0047] Fig.12 A semantic map constructed by the semantic map construction method provided by the embodiment of the present application for a vehicle;
[0048] Fig.13 A schematic diagram of the structure of a semantic map construction device provided in an embodiment of the present application;
[0049] Fig.14 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to realize autonomous driving, it is necessary to be able to model the static and dynamic objects around the vehicle to provide input signals for real-time positioning, path planning, speed planning, etc. of autonomous driving. The construction of the static environment, i.e., map construction, usually adopts sparse semantic maps. The semantic map elements not only contain traffic attribute information (such as lane lines, stop lines, curbs, road signs, traffic lights, traffic signs, street lamp poles and guardrails, etc.), but also need to include the spatial location information of various map elements. For some special cases, such as traffic signs, even the orientation information of map elements must be obtained at the same time.
[0051] The construction of semantic maps can be divided into LiDAR-based semantic map construction solutions and vision-based semantic map construction according to the different sensors used. The vision-based semantic map construction can be divided into monocular vision, binocular vision, depth camera and other technical solutions according to the different visual sensors. Among them, LiDAR is an active measurement device that can directly measure the distance information between the scanned object and the LiDAR sensor. If the category attributes of the scanned object can be identified, the semantic information of the map elements can be obtained relatively easily. However, the scanning angle interval of the LiDAR beam is fixed. When the distance between the object and the sensor is far, the points scanned by the object are relatively sparse, and its attribute information is not easy to obtain compared with the image. In addition, similar to the text on the sign, the laser scanning point cannot obtain the outline of the text, so its information cannot be obtained. In addition, LiDAR has problems such as high price, inconvenient installation, high power consumption, short life, and difficult data fusion, so it is not conducive to large-scale promotion in autonomous driving. The binocular vision sensor has two cameras. By identifying the same feature point and determining the baseline between the binocular cameras, the points with the same name can be directly triangulated to obtain their spatial positions. However, the sensor can only restore the spatial position information of feature points with significant features. For the elements of the semantic map, there are usually no feature points on the image, so they cannot be constructed. Since the baseline of the binocular camera is generally small, when the distance between the object and the camera is large, the error in camera detection is likely to cause a large triangulation error. Therefore, for the binocular camera, only the ranging accuracy of relatively close objects is guaranteed. In addition, the binocular camera has high installation requirements, which is not conducive to mass promotion. The ranging solution based on the depth camera is easily affected by lighting, etc. In complex outdoor scenes, the lighting changes greatly, which is not conducive to the use of depth cameras.
[0052] Monocular camera ranging is usually implemented based on the SFM algorithm: motion information is used to obtain the observation information of the same object in different frame images, the object is identified, and then the baseline between frames is obtained through the calculated motion information, and then the object can be triangulated to obtain its spatial position information. The most commonly used algorithm is the triangulation method using sparse feature points, but since there are usually no significant feature points on the semantic elements of the map, they cannot be triangulated. In addition, the dense reconstruction method is based on the assumption that the photometric error is constant, and the dense reconstruction results of the semantic elements can be obtained, but the dense reconstruction takes a long time and is not conducive to real-time map construction.
[0053] In the related art, several technical solutions have been proposed. For example, in solution 1, the Bbox of the target detection is extracted in each frame of the picture, and the image ROI within the bounding box is extracted based on the Bbox. Feature extraction is performed on the picture of each ROI based on deep learning, and then matching is performed between frames based on the extracted features, and tracking results are obtained according to the degree of matching.
[0054] The scheme has the following problems: it relies on the image content information in the map semantic element Bbox to extract features, and matches the extracted features to obtain matching results between frames; since map semantic elements have no significant features, the feature matching degree inferred from the image content of the Bbox based on deep learning is poor, and effective tracking cannot be achieved. In addition, the problem of missed detection is not effectively handled. When a map semantic element is missed in a frame of the image, multiple matching sequences will appear for the same object, and reconstruction of each matching sequence will lead to multiple reconstructions of the same map semantic element.
[0055] Solution 2, based on feature point extraction and tracking, simultaneously estimates the 3D position of feature points and camera pose, and also estimates the camera distortion parameters. For map semantic elements, they are reconstructed based on the reconstruction results of feature points of map semantic elements.
[0056] This scheme mainly reconstructs the 3D information of feature points, but map semantic elements usually have fewer or no feature points, which is not conducive to the reconstruction of map semantic elements.
[0057] Solution 3: First, obtain the current frame image through the camera; then use the semantic segmentation algorithm to process the current frame image to obtain its semantic information; use the reference frame to optimize the camera pose corresponding to the current frame in a way that minimizes the reconstructed semantic error; based on the optimized camera pose, determine the depth information of the immature points on the reference frame without depth information and the corresponding points on the current frame to form mature points with depth information. In this way, the camera pose corresponding to the image frame can be optimized based on semantic information, so as to obtain an accurate map point cloud more stably.
[0058] This solution has the following problems: the semantic loss function is different. For example, the loss function in this solution is the semantic category difference of the pixel point. When the semantic category difference has multiple categories, its distribution is not monotonic, which will reduce the efficiency of error optimization. In addition, this solution performs 3D restoration on all pixels in the key frame image, which is a dense reconstruction method with a very large amount of calculation, which is not conducive to real-time 3D reconstruction.
[0059] In view of the shortcomings of the above-mentioned scheme, the embodiments of the present application provide a method and device for constructing a semantic map. By associating map semantic element data, the associated data of the map semantic elements is obtained, thereby solving the problem that the map semantic elements have no significant feature points and thus have difficulty in associating. Based on the data association relationship of the map semantic elements, a matching relationship of pixel points is constructed, thereby realizing three-dimensional reconstruction of the map semantic elements. The three-dimensional reconstruction of the map semantic elements can be performed without feature point extraction and certain specific points of the map semantic elements (such as the four corner points of a traffic sign), thereby improving the real-time and robustness of three-dimensional semantic map construction.
[0060] The technical solution of the present application is further described in detail below through the accompanying drawings and embodiments.
[0061] Figure 1 This is a system architecture diagram of a semantic map construction device provided in an embodiment of the present application. Figure 1 As shown, the semantic map construction device provided in the embodiment of the present application mainly includes three subsystems, a semantic element multi-frame data association subsystem, a semantic element three-dimensional reconstruction subsystem and a semantic element position optimization subsystem.
[0062] Image frame sequence information is obtained from the end-side data, including image data information of each frame in the image frame sequence, camera posture information corresponding to each frame of image data, and map semantic element edge contour information in each frame of image data. Then, the data association of map semantic elements in multiple frames of images is realized through the semantic element multi-frame data association subsystem, the sparse reconstruction of map semantic elements is completed through the semantic element three-dimensional reconstruction subsystem, and the position of map semantic elements is optimized through the semantic element position optimization subsystem to improve the accuracy of the three-dimensional semantic map. That is, the image frame sequence information is processed through the three subsystems of semantic element multi-frame data association, semantic element three-dimensional reconstruction and semantic element position optimization to realize the construction of a three-dimensional semantic map and improve the real-time, robustness and high accuracy of the three-dimensional semantic map reconstruction.
[0063] Exemplarily, in the semantic element multi-frame data association subsystem, the bounding box of the map semantic element is preprocessed by the Bbox relaxation unit, for example, the edge contour of the map semantic element whose area is less than the threshold value T1 or whose aspect ratio of the edge contour is greater than the threshold value T2 is subjected to the bounding box relaxation operation, so as to facilitate the subsequent IOU calculation of the Bbox. The similarity of the map semantic element in different image frames is calculated by the inter-frame similarity calculation unit, for example, the similarity is calculated based on the IOU of the map semantic element Bbox and the distance of the Bbox, and data association is performed if the similarity is greater than a preset threshold. Through the keepalive mechanism unit, the erroneous data association caused by missed detection is eliminated based on the keep alive mechanism, so as to realize the data association of the map semantic element in multiple frames.
[0064] In the semantic element 3D reconstruction subsystem, the common points of the map semantic elements are sampled by the 2D edge point sampling unit (the meaning of the common points here can be understood as image pixels without significant feature descriptors). For example, for any map semantic element, N pixels are uniformly sampled on the edge contour of the map semantic element, and the N pixels are the common points of the map semantic element. For example, the center of the contour of the map semantic element is the ray endpoint, and the set of intersections of the ray clusters and the contour with an interval of 360 / N degrees is N pixels; the common point matching pairs of the map semantic elements in different image frames are matched by the 2D common feature point matching unit, for example, the common point matching relationship based on the polar mapping and the data association relationship is constructed to obtain the matching point pairs, and the spatial position of the common points of the map semantic elements is obtained by triangulation calculation based on the common point matching pairs; the spatial Ransac fitting unit is used to obtain the spatial position information of the map semantic elements based on the 3D line and surface fitting of the Ransac model, that is, the 3D reconstruction of the map semantic elements is realized.
[0065] In the semantic element position optimization subsystem, a map semantic element error map is constructed by a bidirectional error map modeling unit, for example, based on the bidirectional nearest neighbor principle, a map semantic element error map is constructed; a 3D map semantic element is reprojected to an associated image by a semantic element reprojection unit to obtain its error sum; and an optimized position of the map semantic element is obtained by a map semantic position optimization unit, for example, with the initial value of the three-dimensional reconstruction of the map semantic element as the center, a map semantic element position search space and a search step are set, the map semantic element is placed at each position in the search space, and its reprojection error is calculated, and the position with the minimum reprojection error is used as the optimized position of the map semantic element.
[0066] The semantic map construction device provided in the embodiments of the present application can be deployed on different terminals and applied to different scenarios.
[0067] For example, in an autonomous driving scenario, a semantic map construction device is deployed at the system layer of the vehicle's onboard system and is called by upper-layer applications through a programmable interface. The semantic map construction device constructs three-dimensional position information of map semantic elements based on the detection results of semantic elements in image sequences acquired by the visual sensors on the vehicle and their position information. The vehicle performs autonomous driving path planning based on the constructed 3D position information of map semantic elements to guide the autonomous driving vehicle.
[0068] In the crowdsourcing map update scenario, the semantic map construction device is deployed on the vehicle. The semantic map construction device constructs the three-dimensional position information of the map semantic elements based on the detection results and posture information of the semantic elements of the image sequence obtained by the visual sensor on the vehicle. The constructed three-dimensional semantic map element 3D position information is compared with the baseline map provided by the vehicle to detect the change relationship of the baseline map, and its change information is transmitted to the cloud for map update.
[0069] In the robot scenario, the semantic map construction device is deployed on the robot to achieve high robustness, high precision and high real-time simultaneous localization and mapping (SLAM) of the robot, and realize automatic path planning of the robot.
[0070] It can be understood that the above-mentioned application scenario examples are only examples of typical application scenarios of the semantic map construction device provided in the embodiment of the present application, and are not exhaustive. The semantic map construction device provided in the embodiment of the present application can also be applied to other feasible scenarios, and the embodiment of the present application does not make specific limitations on this.
[0071] Figure 2 A flowchart of a method for constructing a semantic map provided in an embodiment of the present application. The method can be applied to Figure 1 The device for constructing a semantic map in the present invention can be deployed in terminals such as vehicles and robots to achieve high real-time, high robustness and high precision semantic map construction. Figure 2 As shown, the method for constructing a semantic map provided in the embodiment of the present application includes steps S201 to S205.
[0072] In step S201, information of map semantic elements in multiple frames of images is obtained.
[0073] Taking the vehicle scene as an example, the visual sensor on the vehicle collects an image frame sequence of the vehicle's surrounding environment in real time, and outputs processed image frame data after processing the image frame sequence. The processed image frame data includes image frame sequence data, map semantic elements in each image frame, and camera pose of each image frame.
[0074] For example, a map semantic segmentation module is set in the visual sensor to segment the map semantic element images in the image frame. Optionally, the map semantic segmentation module can implement map semantic segmentation through a deep neural network algorithm, such as deploying a trained map semantic segmentation model to implement map semantic segmentation of the image frame. It can also be implemented through other segmentation algorithms, such as using an heuristic segmentation algorithm to perform map semantic segmentation on the image frame.
[0075] The camera pose of the image frame can be obtained by an inertial measurement unit (IMU), the IMU collects the pose information of the visual sensor, for example, the 6 degrees of freedom (6DoF) pose, and the positioning module obtains the position information of the visual sensor, thereby obtaining the pose information of the visual sensor.
[0076] Visual sensors include but are not limited to monocular cameras and depth cameras.
[0077] The present application embodiment does not specifically limit the image frame sequence. For example, the image frame sequence collected by the visual sensor can be an RGB image sequence or an RGB-D image sequence. An RGB-D image sequence means an image sequence that has both RGB information and depth information.
[0078] The semantic map construction device obtains the processed image frame data in real time, for example, receives the processed image frame data output by the visual sensor in real time, obtains the image frame sequence data, the map semantic element data of each frame image in the image frame sequence and the camera pose data of the image frame.
[0079] The information of map semantic elements can be understood as some semantic elements required to construct a map. For example, map semantic elements can include traffic attribute information, such as lane lines, stop lines, curbs, road signs, traffic lights, traffic signs, lamp poles and guardrails, etc., the spatial position information of various map elements, and for some special cases, such as traffic signs, even the orientation information of map elements.
[0080] The map semantic elements in the image frame can be understood as images with traffic attributes and semantic information in the image frame, such as lane lines, stop lines, curbs, road markings, traffic lights, traffic signs, lamp poles and guardrails in the image frame.
[0081] In one example, in order to facilitate the execution of subsequent steps, the image frame sequence data, the map semantic element data, and the camera pose data of the image frame are cached as corresponding raw data according to the map semantic element tracking results.
[0082] In step S202, a data-associated frame sequence corresponding to the map semantic element is obtained.
[0083] Exemplarily, data association is performed for each map semantic element to obtain a data link frame sequence corresponding to the map semantic element.
[0084] The data-associated frame sequence corresponding to a map semantic element means: an image frame sequence including the map semantic element. For example, in the data-associated frame sequence corresponding to a streetlight pole map semantic element, each image frame includes an image of a streetlight pole.
[0085] Since map semantic feature images usually have no corner points, such as lane line images, map semantic feature images usually have no significant feature points, and the feature points of map semantic features cannot be extracted, and it is also impossible to associate the semantic feature data based on the feature point matching method.
[0086] The embodiment of the present application performs data association through the similarity of the bounding boxes of the map semantic elements to obtain a data association frame sequence of the map semantic elements.
[0087] In one example, the similarity of map semantic elements in different image frames can be determined based on the IOU of the Bbox of the map semantic elements in different image frames and the distance of the Bbox. For example, based on the map semantic element edge detection result obtained from the end side (i.e., the map semantic element image segmentation result), including the pixel point set of the map semantic element edge contour and the map semantic information, the Bbox of the map semantic element is obtained according to the edge contour of the map semantic element, and the Bbox of the map semantic element is firstly relaxed, and then the Bbox after relaxation is respectively calculated for similarity (for example, the similarity is calculated by the IOU of the existing Bbox and the vertex distance), to obtain the inter-frame association relationship of the map semantic element.
[0088] Optionally, it also includes keeping alive prediction for unassociated map semantic elements, continuing to associate data based on the predicted position in the next frame, and determining whether to end the association relationship construction of the local map semantic elements based on whether there is a match.
[0089] Exemplarily, for any map semantic element of the current image frame data, first calculate the area and aspect ratio of the outline of the map semantic element. When the area is less than the threshold T1, or the aspect ratio is greater than the threshold T2, perform Bbox relaxation. For other items that do not meet the above two conditions, keep the Bbox unchanged. For example, for the relaxation method with an area less than the threshold T1, the new Bbox is calculated by enlarging the width and height in equal proportion relative to the center of the original Bbox. For the relaxation method with an aspect ratio greater than the threshold T2, the height is fixed and unchanged, and the width is enlarged by X times relative to the original width to obtain a new Bbox. Then perform Bbox inter-frame matching. One inter-frame matching method can be: map the Bbox positions of all map semantic elements in the previous frame image to the current frame image, calculate the Bbox IOU calculation of each matching pair in the current frame according to the map semantic element category, and multiply it by the IOU similarity factor Ki to obtain the IOU similarity Si of each matching pair. Figure 3 The figure shows the mapping of the Bbox of the streetlight pole (a map semantic element) in the previous frame to the current frame, and the IOU with the Bbox of the streetlight pole in the current frame. At the same time, the reciprocal 1 / d of the distance between the Bbox vertices of all map semantic elements in the previous frame and the Bbox vertices of all map semantic elements of the same category in the current frame is calculated, and multiplied by the vertex distance similarity factor Kd (where Ki+Kd=1), to obtain the vertex distance similarity Sd of each matching pair. Figure 4 The figure shows the vertex distance between the streetlight pole Bbox in the previous frame and the streetlight pole Bbox in the current frame. The similarity (Si+Sd) of each matching pair is calculated. When the maximum similarity of the matching pair Smax>Ts, the semantic element of the previous frame is data associated in the current frame, and the semantic element corresponding to the Bbox in the current frame is used as the data association of the semantic element corresponding to the previous frame. Otherwise, the semantic element is not data associated.
[0090] In the process of map semantic element extraction, missed detection may occur, which will lead to data association interruption. When the same object is detected again in a new frame of image, it will be considered that another independently observed object has been generated due to the interruption of association in the previous frame. This will lead to erroneous reconstruction. To solve this problem, the embodiment of the present application proposes a keep alive mechanism for map semantic elements in the process of map semantic element data association. That is, for a certain map semantic element, if the tracking is interrupted at time t+1, its Bbox at time t is mapped to time t+2. If the association is obtained at time t+2, the association of the object will continue to be performed for the next frame. Otherwise, the association sequence of the object ends at the image frame corresponding to time t.
[0091] Figure 5The figure is a schematic diagram of a keep alive mechanism for tracking map semantic elements. When a map semantic element loses its association in a frame image, the data association is not terminated, but the map semantic element continues to be associated with the next frame. Figure 5 In the figure, map semantic element 3, if the tracking fragment (tracklet) of map semantic element 3 at time t+1 is interrupted, its Bbox at time t is mapped to time t+2, and the tracking association is continued. If the association is obtained at time t+2, the data association of the map semantic element is continued.
[0092] In step S203, pixel point matching pairs of map semantic elements in the first image frame and the second image frame are obtained.
[0093] After data association is performed on the map semantic elements and the associated data corresponding to each map semantic element (ie, a data association frame sequence) is obtained, common point matching is performed on each map semantic element to obtain a common point matching pair of each map semantic element.
[0094] It needs to be explained that universal points refer to pixel points in the image of map semantic elements, such as pixel points collected along the edge contour of map semantic elements. Different from feature points that require pixel points with corner points or texture mutations, universal points do not require special feature extraction algorithms to be extracted, but are directly obtained by collecting pixel points from the image area corresponding to the map semantic elements. For example, the universal points of the map semantic elements are obtained by collecting pixel points along the edge contour of the map semantic elements.
[0095] In one example, after determining the common point matching pair of the map semantic element, the three-dimensional reconstruction result of the map semantic element can be calculated by triangulation. The triangulation accuracy is related to the completeness of the common points of the map semantic element extracted in the image and the parallax of the common points in the image frame pair, and is also related to the pose accuracy of the given reconstructed image frame pair. Therefore, extracting the best key frame pair in the image frame sequence where the semantic element is observed has a positive benefit on the reconstruction accuracy.
[0096] Exemplarily, keyframe pairs can be selected based on the following three factors: (1) Map semantic element integrity factor: When occlusion occurs, the semantic element will be partially occluded in the image and can only be partially reconstructed, with low reconstruction accuracy. The map semantic element closure integrity factor is calculated according to the closure of the map semantic element contour, and the map semantic element closure integrity factor indicates the map semantic element integrity factor.
[0097] Figure 6a and Figure 6b It shows the completeness factor of the semantic elements of the street light pole map in two frames of images. Figure 6aThe street light poles in the image are blocked by vehicles, and the integrity factor of the street light poles in the collected image frames is poor. Figure 6b The street light poles in the image are not blocked, and the integrity factor of the street light poles in the frame collected is good.
[0098] (2) Disparity factor: The relative pose is calculated based on the pose of the key frame pair of the observed map semantic elements. It determines the size of the disparity. The smaller the disparity, the greater the reconstruction error. Figure 7 As shown, when the camera is in posture 1, posture 2, posture 3 and posture 4, it shoots the same observation point. Since the relative posture of posture 1 and posture 4 is the largest, the parallax of the image of the observation point captured by posture 1 and posture 4 is also the largest.
[0099] (3) Pose accuracy of image frames: The pose accuracy of image frames can be given by their covariance matrix. Figure 8 The pose covariance matrix of the candidate image frame is calculated, and the pose covariance matrix indicates the pose accuracy of the candidate image frame, such as Figure 8 As shown, candidate frame 2 corresponds to the highest pose accuracy.
[0100] In one example, when extracting key frame pairs, the first frame data is first extracted in reverse order in the map semantic data association sequence according to the map semantic element completeness factor, and the second frame data is obtained according to the maximum value of the sum of the above three factors.
[0101] After the key frame pair is extracted, a universal point matching operation is performed on the key frame pair. For example, N universal points are uniformly sampled on the contour of the map semantic element in the first frame of the key frame pair. Optionally, the universal point acquisition method can be that the set of intersections between a cluster of rays with an interval of 360 / N degrees and the contour with the center of the contour as the ray endpoint is the universal point set of the map semantic element. According to the pose of the key frame pair and the camera intrinsic parameters, the basic matrix of the epipolar geometry is calculated. According to the basic matrix, the epipolar mapping set of the universal point set on the first frame on the second frame is obtained. The intersection set of each epipolar line in the epipolar mapping set and the contour of the map semantic element in the second frame is the universal point set of the second frame corresponding to the universal point set of the first frame. In this way, the universal point matching pair of the map semantic element is obtained.
[0102] Fig. 9 FIG. 2 shows a schematic diagram of constructing a universal point matching pair based on epipolar mapping. Fig. 9As shown, A1, B1, C1, D1, E1 are the common point sets of the map semantic elements in the first image frame, and e2A2, e2B2, e2C2, e2D2, e2E2 are the epipolar mapping sets of the common point sets of the map semantic elements in the first image frame in the second image frame. The intersection of e2A2, e2B2, e2C2, e2D2, e2E2 and the map semantic elements in the second image frame is A2, B2, C2, D2, E2, then A1 and A2, B1 and B2, C1 and C2, D1 and D2, E1 and E2 are the common point matching pairs of the map semantic elements.
[0103] The embodiment of the present application directly collects pixel points on the contour of map semantic elements as common points through matching of common points, without the need for feature extraction algorithm to extract feature points, thereby increasing the real-time performance of map construction. Furthermore, since multiple pixel points on map semantic elements are collected as common point sets, even if the map semantic elements are partially obscured, it does not affect the construction of the map semantic elements. This increases the robustness of semantic map construction compared to some solutions that require collecting certain special points of map semantic elements (such as corner points, endpoints, etc.).
[0104] In step S204, spatial position information of the map semantic element is obtained based on the pixel matching pairs, the camera pose corresponding to the first image frame, and the camera pose corresponding to the second image frame.
[0105] According to the common point matching pairs, the camera pose corresponding to the first image frame and the camera pose corresponding to the second image frame, a triangulation calculation method is used to obtain the triangulation results of the common points on the map semantic elements, that is, the spatial position information of each common point.
[0106] In step S205, a three-dimensional semantic map is constructed based on the spatial position information of the map semantic elements.
[0107] After obtaining the location information of each common point of the map semantic element, the spatial point cloud of the map semantic element is obtained, such as Fig.10 As shown, according to the linear attributes or surface attributes of the map semantic elements, line fitting or surface fitting is performed on them to obtain the three-dimensional reconstruction result of the map semantic elements.
[0108] For example, when the map semantic element is a street light pole, the map semantic element has a line attribute, and the line fitting is performed based on the spatial point cloud corresponding to the universal point obtained by triangulation calculation to obtain the three-dimensional reconstruction result of the street light pole; when the map semantic element is a traffic sign, the map semantic element has a surface attribute, and the surface fitting is performed based on the spatial point cloud corresponding to the universal point obtained by triangulation calculation to obtain the three-dimensional reconstruction result of the traffic sign.
[0109] In another example, in order to further increase the accuracy of three-dimensional semantic map construction, the semantic map construction method provided in the embodiment of the present application, after the initial three-dimensional semantic map is constructed through steps S301 to S305, also includes a step of optimizing the position of map semantic elements, for example, constructing a map semantic element error map, the map semantic element error map indicating the error information of the map semantic elements reprojected from the three-dimensional semantic map to each image frame of the data association frame corresponding to the map semantic elements; based on the map semantic element error map, adjusting the spatial position information of the map semantic elements, and optimizing the constructed three-dimensional semantic map based on the adjusted spatial position information of the map semantic elements.
[0110] For example, the 3D reconstruction of map semantic elements based on universal point matching can obtain the preliminary results of the 3D reconstruction of the object. Affected by the accuracy of element extraction and polar mapping, the accuracy of the preliminary 3D reconstruction results can be further improved. The 3D reconstruction results of map semantic elements are back-projected into the data-associated frame sequence of the map semantic elements. It can be found that there is a certain deviation between the contour corresponding to the map semantic element in the image and the contour of the map semantic element in the image. In order to improve its accuracy, the contour of the map semantic element in the image can be used as the observation of the map semantic element, and its 3D position can be optimized to reduce its observation error, thereby improving the accuracy of the 3D reconstruction of the semantic element.
[0111] For example, the location optimization of map semantic elements can be achieved through the following steps:
[0112] Step 1. Based on the chamfer distance transformation principle, efficiently construct a map semantic element error map for each frame of the image. For example, all pixels within the contour of all map semantic elements in the image frame are taken as the foreground, and the remaining pixels are taken as the background. The foreground error is 0, and the background error is the chamfer distance of the pixel. To calculate the projection error of a point in space on the image, project the point onto the image, and obtain its error based on the chamfer distance transformation result. Since the projection of a three-dimensional point in space onto the image will obtain its floating-point projection result, that is, its accurate projection point is a sub-pixel point, it is necessary to calculate the chamfer distance error of the sub-pixel point.
[0113] Step 2: Centering on the initial value of the 3D reconstruction of the map semantic element, set the semantic element position search space and search step, place it at each position in the search space, calculate its reprojection error, and take the position with the minimum reprojection error as its optimized position.
[0114] When the semantic map construction method provided in the embodiment of the present application is applied to the real-time map construction scenario of the vehicle, for example, the semantic map construction method provided in the embodiment of the present application is applied to the real-time map construction system of CarBU, and its semantic map construction effect is verified.
[0115] Fig.11 The figure shows the semantic association result of the pole and the card constructed by using the map semantic element association in the semantic map construction method provided by the embodiment of the present application. Fig.11 In the image, different poles and cards have different IDs in the image, and their IDs remain unchanged in different frames.
[0116] Fig.12 The semantic map constructed by the semantic map construction method provided by the embodiment of the present application is applied to the vehicle. The vehicle can specify the driving route according to the three-dimensional semantic map constructed in real time.
[0117] The related technology usually only performs IPM transformation on the road surface elements for map semantic elements, and obtains the three-dimensional reconstruction results of the road surface elements, without the three-dimensional reconstruction results of the roadside elements, and the road surface elements are not three-dimensionally optimized, and the map construction accuracy is poor. The semantic map construction method provided in the embodiment of the present application solves the problem of three-dimensional reconstruction under the condition that the roadside elements have no feature points. It adopts a method based on common points, and finds matching points according to data association and polar mapping to obtain preliminary three-dimensional reconstruction results. At the same time, the accuracy of the preliminary reconstruction result is further optimized according to its semantic data association result, so that its accuracy is further improved.
[0118] In summary, the semantic map construction method provided in the embodiment of the present application realizes the construction of a three-dimensional semantic map with high real-time performance, high robustness and high precision, meets the vehicle's requirements for high real-time performance, high robustness and high precision in map construction, and further increases the driving safety of autonomous driving vehicles.
[0119] Based on the same concept as the above-mentioned embodiment of constructing a semantic map, the present application also provides a semantic map constructing device 1300, which includes a method for implementing Figure 2-12 The units or modules of each step in the method for constructing a semantic map shown.
[0120] Fig.13 A schematic diagram of the structure of a semantic map construction device provided in an embodiment of the present application. The device can be deployed on any device, equipment, platform or equipment cluster with computing capabilities, such as a vehicle or robot, etc., where a map needs to be constructed, to achieve high real-time, high robustness and high precision construction of a three-dimensional semantic map.
[0121] like Fig.13As shown, the semantic map construction device 1300 provided in the embodiment of the present application includes an acquisition module 1301, a data association module 1302, a matching module 1303, a determination module 1304 and a construction module 1305, wherein the acquisition module 1301 is used to acquire information of map semantic elements in multiple frames of images; the data association module 1302 is used to obtain a data association frame sequence corresponding to the map semantic elements, and the images in the data association frame sequence include the map semantic elements; the matching module 1303 is used to obtain pixel point matching pairs of the map semantic elements in the first image frame and the second image frame, and the first image frame and the second image frame are image frames in the data association frame sequence; the determination module 1304 is used to obtain spatial position information of the map semantic elements based on the pixel point matching pairs, the camera posture corresponding to the first image frame and the camera posture corresponding to the second image frame; the construction module 1305 is used to construct a three-dimensional semantic map based on the spatial position information of the map semantic elements.
[0122] In one possible implementation, the data association module 1302 is specifically used to: obtain the bounding box of the map semantic element in each frame of the multiple frames; for each map semantic element, based on the bounding box, perform inter-frame matching, and use the successfully matched image frames as the data association frame sequence corresponding to the map semantic element; wherein the similarity of the bounding boxes of the map semantic elements between the successfully matched image frames is greater than a preset threshold.
[0123] In another possible implementation, the data association module 1302 is further used to: obtain the edge contour of the map semantic element in each frame of the multiple frames; for the edge contour of the map semantic element in each frame, if the edge contour meets the preset conditions, relax the edge contour, and determine the bounding box of the map semantic element based on the edge contour after the relaxation operation; the preset conditions include that the area of the edge contour is less than or equal to the first threshold or the aspect ratio of the edge contour is greater than or equal to the second threshold; if the edge contour does not meet the preset conditions, determine the bounding box of the map semantic element based on the edge contour.
[0124] In another possible implementation, the similarity of bounding boxes of map semantic elements between image frames is positively correlated with the intersection-and-union ratio of the bounding boxes of each map semantic element between the image frames, and negatively correlated with the distance of the bounding boxes of the map semantic elements between the image frames.
[0125] In another possible implementation, the data association module 1302 is further configured to determine, based on a keep alive mechanism, a data association frame sequence corresponding to a map semantic element from multiple frames of images.
[0126] In another possible implementation, the first image frame and the second image frame are determined from a data-associated frame sequence corresponding to the map semantic element based on one or more of a completeness factor of the map semantic element in the image frame, a disparity factor of the map semantic element between different image frames, and a camera pose accuracy corresponding to the image frame where the map semantic element is located.
[0127] In another possible implementation, the matching module 1303 is specifically used to: collect N first pixel points along the edge contour of the map semantic element in the first image frame, where N is a positive integer greater than 1; determine the basic matrix of epipolar geometry based on the camera pose corresponding to the first image frame, the camera pose corresponding to the second image frame and the intrinsic parameters of the camera; determine N epipolar line mappings of the N first pixel points on the second frame image based on the basic matrix of epipolar geometry; determine N second pixel points based on the N intersection points of the N epipolar line mappings and the edge contour of the map semantic element in the second image frame; determine pixel point matching pairs of the map semantic element in the image frame pair based on the N first pixel points and the N second pixel points.
[0128] In another possible implementation, the semantic map construction device 1300 provided in the embodiment of the present application also includes an optimization module 1306, which is used to adjust the spatial position information of the map semantic element based on the error map corresponding to the map semantic element; wherein the error map corresponding to the map semantic element indicates the error information of each image frame of the map semantic element reprojected from the three-dimensional semantic map to the data association frame corresponding to the map semantic element; based on the adjusted spatial position information of the map semantic element, the three-dimensional semantic map is adjusted.
[0129] The semantic map construction device 1300 according to the embodiment of the present application may correspond to the method described in the embodiment of the present application, and the above and other operations and / or functions of each module in the semantic map construction device 1300 are respectively to implement Figure 2-12 For the sake of brevity, the corresponding processes of each method in are not repeated here.
[0130] Based on the same concept as the above-mentioned method embodiment, a computing device is also provided in the embodiment of the present application. The computing device includes at least a processor and a memory. The memory stores a program. When the processor executes the program, it can implement Figure 2-12 The units or modules of each step in the method shown.
[0131] Fig.14 A schematic diagram of the structure of a computing device provided in an embodiment of the present application.
[0132] like Fig.14As shown, the computing device 1400 includes at least one processor 1401, a memory 1402, and a communication interface 1403. The processor 1401, the memory 1402, and the communication interface 1403 are connected in communication, and the communication connection can be achieved by wired means (such as a bus) or by wireless means. The communication interface 1403 is used to receive data sent by other devices (such as a sequence of image frames emitted by a visual sensor); the memory 1402 stores computer instructions, and the processor 1401 executes the computer instructions to execute the method in the aforementioned method embodiment.
[0133] It should be understood that in the embodiment of the present application, the processor 1401 may be a central processing unit CPU, and the processor 1401 may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0134] The memory 1402 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1401. The memory 1402 may also include a nonvolatile random access memory.
[0135] The memory 1402 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0136] It should be understood that the computing device 1400 according to the embodiment of the present application can execute the implementation of the embodiment of the present application. Figure 2-12 The method shown, the detailed description of the implementation of this method can be found above, for the sake of brevity, it will not be repeated here.
[0137] The embodiment of the present application also provides a vehicle, on which a Fig.14 The computing device shown realizes the construction of a semantic map with high real-time performance, high robustness and high precision by processing the image sequence collected by the visual sensor on the vehicle.
[0138] Alternatively, the vehicle's on-board system is deployed with a semantic map construction device provided by an embodiment of the present application, which processes an image sequence collected by a visual sensor on the vehicle to achieve construction of a highly real-time, highly robust and highly precise semantic map.
[0139] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer instructions are executed by a processor, the above-mentioned method is implemented.
[0140] An embodiment of the present application provides a chip, which includes at least one processor and an interface, wherein the at least one processor determines program instructions or data through the interface; the at least one processor is used to execute the program instructions to implement the method mentioned above.
[0141] An embodiment of the present application provides a computer program or a computer program product, wherein the computer program or the computer program product comprises instructions, and when the instructions are executed, the computer is caused to execute the above-mentioned method.
[0142] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0143] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented by hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0144] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A method for constructing a semantic map. It is characterized in that include: Obtain information of map semantic elements in multiple frames of images; Obtaining a data-associated frame sequence corresponding to the map semantic element, wherein an image in the data-associated frame sequence includes the map semantic element; Obtaining pixel point matching pairs of the map semantic element in a first image frame and a second image frame, wherein the first image frame and the second image frame are image frames in the data-associated frame sequence; Obtaining spatial position information of the map semantic element based on the pixel point matching pair, the camera pose corresponding to the first image frame, and the camera pose corresponding to the second image frame; A three-dimensional semantic map is constructed based on the spatial position information of the map semantic elements.
2. The method according to claim 1, It is characterized in that The step of obtaining a data-associated frame sequence corresponding to the map semantic element comprises: Obtaining a bounding box of a map semantic element in each frame of the multiple frames of images; For each map semantic element, inter-frame matching is performed based on the bounding box, and the successfully matched image frame is used as the data association frame sequence corresponding to the map semantic element; wherein the similarity of the bounding box of the map semantic element between the successfully matched image frames is greater than a preset threshold.
3. The method according to claim 2, It is characterized in that The step of obtaining a bounding box of a map semantic element in each image frame of the multiple image frames includes: Acquire edge contours of map semantic elements in each frame of the multiple frames of images; For an edge contour of a map semantic element in each frame of image, if the edge contour does not meet a preset condition, a relaxation operation is performed on the edge contour, and a bounding box of the map semantic element is determined based on the edge contour after the relaxation operation; the preset condition includes that an area of the edge contour is greater than or equal to a first threshold value or that an aspect ratio of the edge contour is less than or equal to a second threshold value; If the edge contour satisfies the preset condition, a bounding box of the map semantic element is determined based on the edge contour.
4. The method according to claim 2 or 3, It is characterized in that The similarity of the bounding boxes of the map semantic elements between the image frames is positively correlated with the intersection-and-union ratio of the bounding boxes of the map semantic elements between the image frames, and negatively correlated with the distance of the bounding boxes of the map semantic elements between the image frames.
5. The method according to any one of claims 1 to 4, It is characterized in that The step of obtaining a data-associated frame sequence corresponding to the map semantic element comprises: Based on the keep alive mechanism, a data associated frame sequence corresponding to the map semantic element is determined from the multiple frames of images.
6. The method according to any one of claims 1 to 5, It is characterized in that The first image frame and the second image frame are determined from a data-associated frame sequence corresponding to the map semantic element based on one or more of a completeness factor of the map semantic element in the image frame, a disparity factor of the map semantic element between different image frames, and a camera pose accuracy corresponding to the image frame where the map semantic element is located.
7. The method according to any one of claims 1 to 6, It is characterized in that The step of obtaining pixel point matching pairs of the map semantic elements in the first image frame and the second image frame includes: Collecting N first pixel points along the edge contour of the map semantic element from the first image frame, where N is a positive integer greater than 1; Determine a basic matrix of epipolar geometry based on a camera pose corresponding to the first image frame, a camera pose corresponding to the second image frame, and an intrinsic parameter of the camera; Determine, based on the epipolar geometry basic matrix, N epipolar line mappings of the N first pixel points on the second frame image; Determining N second pixel points based on N intersection points of the N epipolar line mappings and the edge contour of the map semantic element in the second image frame; Based on the N first pixel points and the N second pixel points, pixel point matching pairs of the map semantic elements in the image frame pair are determined.
8. The method according to any one of claims 1 to 7, It is characterized in that Also includes: Based on the error map corresponding to the map semantic element, adjusting the spatial position information of the map semantic element; wherein the error map corresponding to the map semantic element indicates the error information of each image frame of the map semantic element reprojected from the three-dimensional semantic map to the data association frame corresponding to the map semantic element; The three-dimensional semantic map is adjusted based on the adjusted spatial position information of the map semantic elements.
9. A vehicle route planning method, It is characterized in that include: Constructing a three-dimensional semantic map of the vehicle's surroundings based on the method described in any one of claims 1 to 8; Based on the three-dimensional semantic map, a driving route of the vehicle is planned.
10. A device for constructing a semantic map, It is characterized in that include: An acquisition module, used for acquiring information of map semantic elements in multiple frame images; A data association module, used to obtain a data association frame sequence corresponding to the map semantic element, wherein the image in the data association frame sequence includes the map semantic element; A matching module, used for obtaining pixel point matching pairs of the map semantic elements in a first image frame and a second image frame, wherein the first image frame and the second image frame are image frames in the data-associated frame sequence; A determination module, configured to obtain spatial position information of the map semantic element based on the pixel point matching pair, the camera pose corresponding to the first image frame, and the camera pose corresponding to the second image frame; The construction module is used to construct a three-dimensional semantic map based on the spatial position information of the map semantic elements.
11. The device according to claim 10, It is characterized in that The data association module is specifically used for: Obtaining a bounding box of a map semantic element in each frame of the multiple frames of images; For each map semantic element, inter-frame matching is performed based on the bounding box, and the successfully matched image frame is used as the data association frame sequence corresponding to the map semantic element; wherein the similarity of the bounding box of the map semantic element between the successfully matched image frames is greater than a preset threshold.
12. The device according to claim 11, It is characterized in that The data association module is also used for: Acquire edge contours of map semantic elements in each frame of the multiple frames of images; For an edge contour of a map semantic element in each frame of image, if the edge contour satisfies a preset condition, a relaxation operation is performed on the edge contour, and a bounding box of the map semantic element is determined based on the edge contour after the relaxation operation; the preset condition includes that an area of the edge contour is less than or equal to a first threshold value or that an aspect ratio of the edge contour is greater than or equal to a second threshold value; If the edge contour does not satisfy the preset condition, a bounding box of the map semantic element is determined based on the edge contour.
13. The device according to claim 11 or 12, It is characterized in that The similarity of the bounding boxes of the map semantic elements between the image frames is positively correlated with the intersection-and-union ratio of the bounding boxes of the map semantic elements between the image frames, and negatively correlated with the distance of the bounding boxes of the map semantic elements between the image frames.
14. The device according to any one of claims 10 to 13, It is characterized in that The data association module is also used for: Based on the keep alive mechanism, a data associated frame sequence corresponding to the map semantic element is determined from the multiple frames of images.
15. The device according to any one of claims 10 to 14, It is characterized in that The first image frame and the second image frame are determined from a data-associated frame sequence corresponding to the map semantic element based on one or more of a completeness factor of the map semantic element in the image frame, a disparity factor of the map semantic element between different image frames, and a camera pose accuracy corresponding to the image frame where the map semantic element is located.
16. The device according to any one of claims 10 to 15, It is characterized in that The matching module is specifically used for: Collecting N first pixel points along the edge contour of the map semantic element from the first image frame, where N is a positive integer greater than 1; Determine a basic matrix of epipolar geometry based on a camera pose corresponding to the first image frame, a camera pose corresponding to the second image frame, and an intrinsic parameter of the camera; Determine, based on the epipolar geometry basic matrix, N epipolar line mappings of the N first pixel points on the second frame image; Determining N second pixel points based on N intersection points of the N epipolar line mappings and the edge contour of the map semantic element in the second image frame; Based on the N first pixel points and the N second pixel points, pixel point matching pairs of the map semantic elements in the image frame pair are determined.
17. The device according to any one of claims 10 to 16, It is characterized in that Also includes: An optimization module, configured to adjust the spatial position information of the map semantic element based on an error map corresponding to the map semantic element; wherein the error map corresponding to the map semantic element indicates error information of each image frame of the map semantic element reprojected from the three-dimensional semantic map to the data association frame corresponding to the map semantic element; The three-dimensional semantic map is adjusted based on the adjusted spatial position information of the map semantic elements.
18. A vehicle, It is characterized in that A device for constructing a semantic map comprising:
19. A computing device comprising a memory and a processor, It is characterized in that The memory stores executable codes, and the processor executes the executable codes to implement the method according to any one of claims 1 to 9.
20. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 9.
