A semantic point cloud map construction method
Through visual sensors and deep learning technology, environmental data is acquired and processed to construct a three-dimensional semantic point cloud map that can maintain accuracy and smoothness in a dynamic environment, solving the problem of positioning semantic maps in dynamic environments and complex scenes in the existing technology. Dealing with the problem of insufficient capacity.
Patent Information
- Application Number
- CN202311684930.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-08
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2043-12-08
AI Technical Summary
The existing technology lacks the perception of environmental semantic information in the construction of semantic maps in dynamic environments, easily loses positioning information, cannot perform high-level intelligent tasks, and cannot cope with complex dynamic scenes.
Obtain environmental data through visual sensors, use binocular stereo matching ELAS algorithm and DeepPruner network to obtain disparity maps, combine with semantic segmentation network to obtain pixel-level semantic information, perform dynamic feature detection and point cloud clustering, and use twin networks to construct point cloud sub-maps. Realize the construction of 3D semantic point cloud map.
It improves the smoothness and construction accuracy of semantic maps, can maintain positioning information in complex dynamic scenes, and improves the perception and understanding capabilities of robot navigation.
Smart Images

Figure CN117788730B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of point cloud maps, and in particular to a method for constructing a semantic point cloud map. Background Art
[0002] People's requirements for the intelligence of robots are increasing day by day. The perception and comprehension abilities of robots themselves have become an important part of determining the level of robot intelligence. Perception ability refers to the robot's ability to obtain scene information in the surrounding environment through its own sensors, while comprehension ability refers to the analysis and processing of the obtained environmental information, and then understanding its own current situation. Not only indoor robots, but now outdoor robots also need to obtain semantic information in the environment, and then analyze and make decisions on the current situation. Semantic maps can provide robots with external environmental and semantic information, thereby improving the robot's ability to perceive and understand and handle tasks outside.
[0003] At present, the construction of semantic maps is inseparable from the extraction of semantic information in images. The existing technology obtains the camera's position and posture through feature point method SLAM and uses the target detection network to realize the construction of semantic maps, but there are still the following problems:
[0004] (1) In the process of simultaneous positioning and mapping SLAM in a dynamic environment, there is a lack of perception of environmental semantic information. At the same time, it is easily disturbed by dynamic objects, and positioning information is easily lost, making it impossible to perform high-level intelligent tasks.
[0005] (2) When constructing semantic maps in large outdoor scenes, it is limited by memory and cannot cope with relatively complex dynamic scenes. Summary of the invention
[0006] The purpose of the present invention is to provide a semantic point cloud map construction method, a computer device and a storage medium to solve the technical problems in the prior art that semantic maps lack perception of environmental semantic information, are disturbed by dynamic objects, are prone to lose positioning information, cannot perform high-level intelligent tasks, and cannot cope with relatively complex dynamic scenes.
[0007] In order to solve the above technical problems, the present invention specifically provides the following technical solutions:
[0008] The present invention provides a method for constructing a semantic point cloud map, comprising the following steps:
[0009] Continuously acquiring environmental data information through a visual sensor, using a binocular stereo matching ELAS algorithm to obtain a disparity map based on the visual sensor through a stereo matching DeepPruner network, and using a semantic segmentation network to obtain pixel-level semantic information of the image from the disparity map;
[0010] Performing dynamic feature detection on the pixel-level semantic information to obtain object pose estimation data in a dynamic scene, and performing motion consistency detection on the object pose estimation data to obtain dynamic feature points in the image;
[0011] After point cloud clustering is performed on the dynamic feature points, a point cloud fitting plane is obtained, and similarity matching is performed on the point cloud fitting plane through a twin network to construct a point cloud submap, path planning information of point cloud semantic information is obtained, and a key frame image of a corresponding submap is obtained according to the path planning information;
[0012] Detect and identify various target objects in the key frame image, segment the pixel points in the key frame image and project them into three-dimensional coordinates, construct a three-dimensional semantic point cloud map, and obtain point cloud semantic map information.
[0013] As a preferred solution of the present invention, the environmental data information is subjected to the ELAS algorithm to obtain the disparity map based on the visual sensor through the DeepPruner network, including:
[0014] The environmental data information acquired by the visual sensor is subjected to an ELAS algorithm to acquire a trimming range of each pixel, and a left-right disparity search space is established for the environmental data information according to the trimming range;
[0015] Setting a pixel brightness threshold of a corresponding pixel point for the environmental data information in the left-right disparity search space, and judging whether the continuous pixel brightness value range of the environmental data information is within the range of the pixel brightness threshold value, if it is within the range of the pixel brightness threshold value, extracting the corresponding pixel point as a feature point, otherwise excluding the corresponding pixel point;
[0016] K disparity values are randomly generated for the feature points, and the K disparity values are subjected to circular convolution to obtain a feature set. An inner product operation is performed on the left and right feature matrices in the feature set to obtain a matching score of the corresponding disparity map:
[0017] A i,j ={f0(i+r i,j )·f1(i+d i,j )}
[0018] Among them, f0 represents the left feature matrix of the left image, f1 represents the right feature matrix of the right image, and r i,j represents the jth candidate for the i-th pixel in the right eye, d i,j represents the jth candidate of the i-th pixel in the left eye, i represents the number of pixels, A i,j represents the matching score of the i-th pixel in the j-th candidate;
[0019] For the matching score A i,jIteration is performed to obtain the first K best disparity values, and convolution training is performed on the first K best disparity values to obtain corresponding disparity maps.
[0020] As a preferred solution of the present invention, a semantic segmentation network is used to obtain pixel-level semantic information of the image from the disparity map, including:
[0021] The semantic segmentation network uses a fully convolutional network to perform end-to-end intensive training on the disparity map to obtain deep semantic features, performs a deconvolution operation on the deep semantic features and maps them to the original disparity map to extract the corresponding pixel-level semantic information.
[0022] As a preferred solution of the present invention, dynamic feature detection is performed on the pixel-level semantic information to obtain object pose estimation data in a dynamic scene, including:
[0023] Inputting the pixel-level semantic information into a fully convolutional neural network to obtain image features, dividing the corresponding disparity map into S×S grids according to the image features, and predicting B bounding boxes and confidence values for each of the grids, wherein the confidence value indicates the probability of containing the target object in the bounding box and the matching degree of the corresponding target in the bounding box;
[0024] Perform target prediction on each grid divided by the disparity map to generate S×S×B windows, calculate the maximum value corresponding to each window, remove the predicted border with a low confidence value by searching the local maximum value, obtain the predicted border with a high confidence value, perform dynamic detection on the target within the predicted border, and obtain the object's pose estimation data.
[0025] As a preferred solution of the present invention, the pose estimation data is subjected to motion consistency detection to obtain dynamic feature points in the image, including:
[0026] The feature extractor Darknet is used to extract feature sequence data from the pose estimation data to form a feature point set U1, and the corresponding homogeneous coordinates of the feature point set U1 are obtained by matrix transformation;
[0027] Calculate the basic matrix of the epipolar line for the homogeneous coordinates, and calculate the distance between the basic matrix and the pixel plane;
[0028] The motion loss of the pose estimation data is determined by a classification loss function for the feature sequence data, and the classification loss function expression is:
[0029] s x,y =b w (σ(t x )+c x )+b h (σ(t y )+c y )
[0030] Among them, b w , b h Indicates the length of the predicted bounding box corresponding to the pose estimation data, t x ,t y represents the side length of the target border, c x 、c y represents the coordinate offset of the grid, σ(t x ),σ(t y ) represents the loss prediction of the target border length;
[0031] A distance threshold is set according to the classification loss function, and when the distance between the basic matrix and the pixel plane is less than the distance threshold, the basic matrix is determined as a dynamic feature point.
[0032] As a preferred solution of the present invention, point cloud fitting plane is obtained by clustering the dynamic feature points, including:
[0033] The dynamic feature points are taken as an original point set Q, three non-collinear points {A(x1, y1, z1), B(x2, y2, z2), C(x3, y3, z3)} are randomly selected from the set Q to construct a plane to be fitted, and a point cloud plane equation of the plane to be fitted is obtained;
[0034] Calculate the average distance from all points in the set Q to the plane to be fitted, take the average distance as a threshold, then calculate the distance from all sampling points to the plane to be fitted, and add the points whose distance is less than the threshold to the set Q;
[0035] Count the number of points in the plane to be fitted. If the number is greater than k, the fitted plane is valid. Calculate the average value of all points in the fitted plane, refit the plane, and select the plane with the largest number of points in the plane to be fitted as the point cloud fitting plane to be extracted.
[0036] As a preferred solution of the present invention, the point cloud fitting plane is matched with similarity through a twin network to construct a point cloud submap, including:
[0037] Using a twin network to perform similarity matching on the point cloud fitting plane, obtaining image A and image B through the similarity matching, and calculating the pose conversion between image A and image B;
[0038] The image sequence collected for the image A is set as set G, the image sequence collected for the image B is set as set P, the image threshold M is set, and the images taken at equal intervals in the set G are set as G A , take out images at equal intervals from the set P and set them as P B ;
[0039] Compare the G through the twin network A , P B For an image sequence in an image, if the similarity exceeds the image threshold M, the matching pair and the similarity are recorded; if the similarity does not exceed the image threshold M, no record is made;
[0040] The matching pairs are sorted according to similarity, feature points of the two images of the matching pairs are extracted from high to low for matching, and a transfer matrix between the matching pairs is obtained;
[0041] The pose transformations between adjacent matching pairs are spliced according to the transfer matrix to construct a point cloud submap.
[0042] As a preferred solution of the present invention, obtaining path planning information of point cloud semantic information according to the point cloud submap, and obtaining a key frame image of a corresponding submap according to the path planning information includes:
[0043] Rasterize the point cloud sub-map to obtain a node set S, define the starting node v s 、Target node v t , with the starting node v s As the starting point, search for the nodes adjacent to it and add them to the set U, and select the node v with the shortest distance to the starting point from the set U. h , the node v h As the current node;
[0044] During the search process, search for the node v h Adjacent node v that is not in set S n , the node v n Add to the set U, and for each node in the set U, calculate its distance to the starting node v s The distance d sm and to the current node v h The distance d sn ;
[0045] Compare each node in the set U to the starting node v s The distance d sm From each node in the set U to the current node v h The distance d sn The size between them, updates the target node v t , repeat the above process until the current node is the target node v t until;
[0046] Path planning is implemented according to all node information between the starting node and the current node, and a key frame image of a corresponding sub-map is obtained.
[0047] As a preferred solution of the present invention, the key frame image is subjected to spatial coordinate transformation of segmented pixels to obtain three-dimensional coordinates and construct a three-dimensional semantic point cloud map, including:
[0048] Record the depth value corresponding to each pixel of the key frame image in the form of grayscale value, perform instance segmentation on the key frame image according to the depth value, project the pixel points in the image obtained after the instance segmentation into three-dimensional space, and obtain the three-dimensional coordinates corresponding to each pixel point;
[0049] A global point cloud map is created for the key frame image using the visual synchronization and map construction algorithm SLAM, the posture information corresponding to the current key frame image is extracted through the three-dimensional coordinates, the posture information is accumulated into the global point cloud map, and a comprehensive three-dimensional semantic point cloud map is constructed.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] The present invention obtains disparity maps through the ELAS algorithm and the DeepPruner network respectively, and uses the semantic segmentation network to obtain pixel-level semantic information of the image. When the disparity obtained by DeepPruner is used to fill the holes in the ELAS result map, some objects with strong textures are replaced together according to the results of semantic segmentation, so that a smoother and more beautiful map can be constructed when constructing a semantic point cloud map.
[0052] The YOLOv3 network is used to detect movable objects in the image, and the convolutional neural network is combined to detect dynamic feature points in the image. The detected dynamic features are tracked through motion consistency, and the divide-and-conquer method is used to construct the entire large-scale scene map. When constructing the outdoor scene map, the image sequence of the environment is collected at different locations to construct a sub-map. The similarity matching of the image sequence is detected based on the twin network, and the relative position between the two sub-maps is calculated based on the candidate matching pairs. Finally, the sub-maps are merged into a whole map, which improves the smoothness and construction accuracy of the semantic map, can cope with complex dynamic scenes, and improves the perception and understanding ability of semantic map navigation. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the implementation of the present invention or the technical solution in the prior art, the following briefly introduces the drawings required for the implementation or the prior art description. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0054] Figure 1A flowchart of a semantic point cloud map construction method provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] like Figure 1 As shown, the present invention provides a method for constructing a semantic point cloud map, comprising the following steps:
[0057] Continuously acquiring environmental data information through a visual sensor, using a binocular stereo matching ELAS algorithm to obtain a disparity map based on the visual sensor through a stereo matching DeepPruner network, and using a semantic segmentation network to obtain pixel-level semantic information of the image from the disparity map;
[0058] In this embodiment, the binocular stereo matching ELAS algorithm is used to process the environmental data information, and the stereo matching process is modeled based on the Bayesian optimal estimation theory. Finally, the parallax is obtained by estimating and reasoning through the maximum a posteriori probability method, which can effectively improve the data processing accuracy.
[0059] In this embodiment, the stereo matching DeepPruner network reduces unnecessary losses by predicting the range of confidence of each pixel, and only needs to focus on areas with higher possibilities, prunes the search space according to the obtained areas, and finally further improves the overall performance through the image-guided optimization module, which can speed up the operation speed of the current stereo matching algorithm to achieve real-time operation.
[0060] Performing dynamic feature detection on the pixel-level semantic information to obtain object pose estimation data in a dynamic scene, and performing motion consistency detection on the object pose estimation data to obtain dynamic feature points in the image;
[0061] In this embodiment, static objects with local motion in the pixel-level semantic information are first removed to prevent the overall object from being judged as a moving object due to local motion. In order to realize the judgment of dynamic attributes, the number of dynamic points in the pixel-level semantic information is counted, and the threshold is set to 60% by default. When the ratio of the number of dynamic points to the number of all points in the contour exceeds the threshold, it is judged as a dynamic target, and the relevant information in the contour of this target is cleared to obtain a more reliable pose estimation with static features.
[0062] After point cloud clustering is performed on the dynamic feature points, a point cloud fitting plane is obtained, and similarity matching is performed on the point cloud fitting plane through a twin network to construct a point cloud submap, path planning information of point cloud semantic information is obtained, and a key frame image of a corresponding submap is obtained according to the path planning information;
[0063] In this embodiment, a random sampling consistency algorithm is used to obtain the point cloud fitting plane, and noise points are effectively eliminated during fitting, so as to more accurately determine the position in the indoor semantic map. The model is fitted with the points in the point cloud fitting plane, and then other data are tested against the fitting model. When the data is suitable for the fitted model, it is considered to be an inlier. If enough points in the point cloud plane are classified as inliers, the fitted model is considered to be reasonable enough.
[0064] Detect and identify various target objects in the key frame image, segment the pixel points in the key frame image and project them into three-dimensional coordinates, construct a three-dimensional semantic point cloud map, and obtain point cloud semantic map information.
[0065] The environmental data information is subjected to the ELAS algorithm and the DeepPruner network to obtain the disparity map based on the visual sensor, including:
[0066] The environmental data information acquired by the visual sensor is subjected to an ELAS algorithm to acquire a trimming range of each pixel, and a left-right disparity search space is established for the environmental data information according to the trimming range;
[0067] In this embodiment, the ELAS algorithm is used to obtain the repair range of each pixel, remove invalid data, and improve the search efficiency.
[0068] Setting a pixel brightness threshold of a corresponding pixel point for the environmental data information in the left-right disparity search space, and judging whether the continuous pixel brightness value range of the environmental data information is within the range of the pixel brightness threshold value, if it is within the range of the pixel brightness threshold value, extracting the corresponding pixel point as a feature point, otherwise excluding the corresponding pixel point;
[0069] K disparity values are randomly generated for the feature points, and the K disparity values are subjected to circular convolution to obtain a feature set. An inner product operation is performed on the left and right feature matrices in the feature set to obtain a matching score of the corresponding disparity map:
[0070] A i,j ={f0(i+r i,j )·f1(i+d i,j )}
[0071] Among them, f0 represents the left feature matrix of the left image, f1 represents the right feature matrix of the right image, and r i,jrepresents the jth candidate for the i-th pixel in the right eye, d i,j represents the jth candidate of the i-th pixel in the left eye, i represents the number of pixels, A i,j represents the matching score of the i-th pixel in the j-th candidate;
[0072] For the matching score A i,j Iteration is performed to obtain the first K best disparity values, and convolution training is performed on the first K best disparity values to obtain corresponding disparity maps.
[0073] In this embodiment, the matching score is used to obtain the trimming range of each pixel and the sparse part is obtained, the hole part is filled, and finally a reliable feature expression is provided for each pixel, so that a better map can be constructed.
[0074] The disparity map is subjected to a semantic segmentation network to obtain pixel-level semantic information of the image, including:
[0075] The semantic segmentation network uses a fully convolutional network to perform end-to-end intensive training on the disparity map to obtain deep semantic features, performs a deconvolution operation on the deep semantic features and maps them to the original disparity map to extract the corresponding pixel-level semantic information.
[0076] In this embodiment, semantic segmentation uses a neural network to identify targets as corresponding categories. In order to better observe and distinguish the semantic information of different objects, the pixels of different objects are modified to corresponding colors through a set color palette.
[0077] In this embodiment, a fully convolutional network is used to extract features from the disparity map to obtain feature points distributed on the image. The semantic segmentation method is used to leave only two types of information in the environment: background and dynamic objects. The feature extraction and image segmentation of the environment can enable the SLAM system to accurately eliminate irrelevant interference points. When the clean feature points are used for pose estimation, the SLAM system can work well in a dynamic environment. This achieves the purpose of eliminating dynamic points in a dynamic environment and then performing pose estimation.
[0078] Performing dynamic feature detection on the pixel-level semantic information to obtain object pose estimation data in a dynamic scene includes:
[0079] Inputting the pixel-level semantic information into a fully convolutional neural network to obtain image features, dividing the corresponding disparity map into S×S grids according to the image features, and predicting B bounding boxes and confidence values for each of the grids, wherein the confidence value indicates the probability of containing the target object in the bounding box and the matching degree of the corresponding target in the bounding box;
[0080] Perform target prediction on each grid divided by the disparity map to generate S×S×B windows, calculate the maximum value corresponding to each window, remove the predicted border with a low confidence value by searching the local maximum value, obtain the predicted border with a high confidence value, perform dynamic detection on the target within the predicted border, and obtain the object's pose estimation data.
[0081] Performing motion consistency detection on the pose estimation data to obtain dynamic feature points in the image includes:
[0082] The feature extractor Darknet is used to extract feature sequence data from the pose estimation data to form a feature point set U1, and the corresponding homogeneous coordinates of the feature point set U1 are obtained by matrix transformation;
[0083] Calculate the basic matrix of the epipolar line for the homogeneous coordinates, and calculate the distance between the basic matrix and the pixel plane;
[0084] The motion loss of the pose estimation data is determined by a classification loss function for the feature sequence data, and the classification loss function expression is:
[0085] s x,y =b w (σ(t x )+c x )+b h (σ(t y )+c y )
[0086] Among them, b w , b h Indicates the length of the predicted bounding box corresponding to the pose estimation data, t x ,t y represents the side length of the target border, c x 、c y represents the coordinate offset of the grid, σ(t x ),σ(t y ) represents the loss prediction of the target border length;
[0087] A distance threshold is set according to the classification loss function, and when the distance between the basic matrix and the pixel plane is less than the distance threshold, the basic matrix is determined as a dynamic feature point.
[0088] In this embodiment, motion consistency is used to divide dynamic feature points with the same characteristics and provide a better boundary contour. The similarity of pixel points is used to merge common pixel points together, and a high calculation efficiency can be maintained.
[0089] The point cloud fitting plane is obtained by clustering the dynamic feature points, including:
[0090] The dynamic feature points are taken as an original point set Q, three non-collinear points {A(x1, y1, z1), B(x2, y2, z2), C(x3, y3, z3)} are randomly selected from the set Q to construct a plane to be fitted, and a point cloud plane equation of the plane to be fitted is obtained;
[0091] Calculate the average distance from all points in the set Q to the plane to be fitted, take the average distance as a threshold, then calculate the distance from all sampling points to the plane to be fitted, and add the points whose distance is less than the threshold to the set Q;
[0092] Count the number of points in the plane to be fitted. If the number is greater than k, the fitted plane is valid. Calculate the average value of all points in the fitted plane, refit the plane, and select the plane with the largest number of points in the plane to be fitted as the point cloud fitting plane to be extracted.
[0093] In this embodiment, a random sampling consistency algorithm is used to process the semantic elements, effectively eliminating noise points during fitting, and more accurately positioning the semantic elements in the indoor semantic map.
[0094] In this embodiment, a convolutional neural network is used to identify the semantic information of obstacle point clouds, and the obstacle type is determined based on the semantic information and point cloud features. The result is projected onto a two-dimensional plane to realize the construction of an indoor semantic map, which effectively enhances the accuracy and applicability of indoor maps and provides a construction and optimization basis for subsequent navigation network construction and path planning.
[0095] The point cloud fitting plane is matched with similarity through a twin network to construct a point cloud submap, including:
[0096] Using a twin network to perform similarity matching on the point cloud fitting plane, obtaining image A and image B through the similarity matching, and calculating the pose conversion between image A and image B;
[0097] The image sequence collected for the image A is set as set G, the image sequence collected for the image B is set as set P, the image threshold M is set, and the images taken at equal intervals in the set G are set as G A , take out images at equal intervals from the set P and set them as P B ;
[0098] Compare the G through the twin network A , P B For an image sequence in an image, if the similarity exceeds the image threshold M, the matching pair and the similarity are recorded; if the similarity does not exceed the image threshold M, no record is made;
[0099] The matching pairs are sorted according to similarity, feature points of the two images of the matching pairs are extracted from high to low for matching, and a transfer matrix between the matching pairs is obtained;
[0100] The pose transformations between adjacent matching pairs are spliced according to the transfer matrix to construct a point cloud submap.
[0101] In this embodiment, a divide-and-conquer approach is adopted, and the tasks of each sub-map are assigned to different devices for collection. After the point cloud of the sub-map is constructed, the posture transformation relationship between the sub-maps is obtained through image matching, and then the posture between the sub-maps is adjusted through the transformation matrix for splicing. Multiple sub-maps can be constructed at the same time. Using the sub-map method to construct maps can more efficiently construct outdoor maps.
[0102] Acquiring path planning information of point cloud semantic information according to the point cloud sub-map, and acquiring a key frame image of a corresponding sub-map according to the path planning information, including:
[0103] Rasterize the point cloud sub-map to obtain a node set S, define the starting node v s 、Target node v t , with the starting node v s As the starting point, search for the nodes adjacent to it and add them to the set U, and select the node v with the shortest distance to the starting point from the set U. h , the node v h As the current node;
[0104] During the search process, search for the node v h Adjacent node v that is not in set S n , the node v n Add to the set U, and for each node in the set U, calculate its distance to the starting node v s The distance d sm and to the current node v h The distance d sn ;
[0105] Compare each node in the set U to the starting node v s The distance d sm From each node in the set U to the current node v h The distance d sn The size between them, updates the target node v t , repeat the above process until the current node is the target node v t until;
[0106] Path planning is implemented according to all node information between the starting node and the current node, and a key frame image of a corresponding sub-map is obtained.
[0107] In this embodiment, the map is constructed through the set processing strategy, and a balance is achieved between the overlap of image information and the consumption of computing resources. The redundancy of image information is mainly manifested in that multiple frames of images contain repeated feature point information, that is, common view key frames, which causes unnecessary resource consumption. The screening of key frames can be completed by detecting the connectivity between image frames.
[0108] The key frame image is subjected to spatial coordinate transformation of segmented pixels to obtain three-dimensional coordinates and construct a three-dimensional semantic point cloud map, including:
[0109] Record the depth value corresponding to each pixel of the key frame image in the form of grayscale value, perform instance segmentation on the key frame image according to the depth value, project the pixel points in the image obtained after the instance segmentation into three-dimensional space, and obtain the three-dimensional coordinates corresponding to each pixel point;
[0110] In this embodiment, a stereo vision camera is used to obtain a depth image corresponding to the color image timestamp. The depth image records the depth value corresponding to each pixel in the form of grayscale values. With the help of the depth map, the pixel points in the image obtained by instance segmentation can be projected into three-dimensional space to obtain the three-dimensional coordinates corresponding to each point in the camera coordinate system.
[0111] A global point cloud map is created for the key frame image using the visual synchronization and map construction algorithm SLAM, the posture information corresponding to the current key frame image is extracted through the three-dimensional coordinates, the posture information is accumulated into the global point cloud map, and a comprehensive three-dimensional semantic point cloud map is constructed.
[0112] In this embodiment, after the pixel coordinates in the image are converted into three-dimensional space coordinates, a point cloud of a single image can be obtained, and the point cloud information is projected into a three-dimensional point cloud map, thereby associating the segmented semantic information with its actual coordinate position in the map.
[0113] In this embodiment, the current key frame point cloud information is added to the global point cloud map to obtain a more comprehensive point cloud map. In the process of adding new key frames, the global point cloud map is continuously updated and improved. When the system ends, the global point cloud map can be saved to view the point cloud map construction effect.
[0114] The present invention obtains disparity maps through the ELAS algorithm and the DeepPruner network respectively, and uses the semantic segmentation network to obtain pixel-level semantic information of the image. When the disparity obtained by DeepPruner is used to fill the holes in the ELAS result map, some objects with strong textures are replaced together according to the results of semantic segmentation, so that a smoother and more beautiful map can be constructed when constructing a semantic point cloud map.
[0115] The YOLOv3 network is used to detect movable objects in the image, and the convolutional neural network is combined to detect dynamic feature points in the image. The detected dynamic features are tracked through motion consistency, and the divide-and-conquer method is used to construct the entire large-scale scene map. When constructing the outdoor scene map, the image sequence of the environment is collected at different locations to construct a sub-map. The similarity matching of the image sequence is detected based on the twin network, and the relative position between the two sub-maps is calculated based on the candidate matching pairs. Finally, the sub-maps are merged into a whole map, which improves the smoothness and construction accuracy of the semantic map, can cope with complex dynamic scenes, and improves the perception and understanding ability of semantic map navigation.
[0116] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A method for constructing a semantic point cloud map, characterized in that: The following steps are involved: Continuously acquiring environmental data information through a visual sensor, using a binocular stereo matching ELAS algorithm to obtain a disparity map based on the visual sensor through a stereo matching DeepPruner network, and using a semantic segmentation network to obtain pixel-level semantic information of the image from the disparity map; Performing dynamic feature detection on the pixel-level semantic information to obtain object pose estimation data in a dynamic scene, and performing motion consistency detection on the object pose estimation data to obtain dynamic feature points in the image; After point cloud clustering is performed on the dynamic feature points, a point cloud fitting plane is obtained, and similarity matching is performed on the point cloud fitting plane through a twin network to construct a point cloud submap, path planning information of point cloud semantic information is obtained, and a key frame image of a corresponding submap is obtained according to the path planning information; Detect and identify various target objects in the key frame image, segment the pixel points in the key frame image and project them into three-dimensional coordinates, construct a three-dimensional semantic point cloud map, and obtain point cloud semantic map information; The environmental data information is subjected to the ELAS algorithm and the DeepPruner network to obtain the disparity map based on the visual sensor, including: The environmental data information acquired by the visual sensor is subjected to an ELAS algorithm to acquire a trimming range of each pixel, and a left-right disparity search space is established for the environmental data information according to the trimming range; Setting a pixel brightness threshold of a corresponding pixel point for the environmental data information in the left-right disparity search space, and judging whether the continuous pixel brightness value range of the environmental data information is within the range of the pixel brightness threshold value, if it is within the range of the pixel brightness threshold value, extracting the corresponding pixel point as a feature point, otherwise excluding the corresponding pixel point; K disparity values are randomly generated for the feature points, and the K disparity values are subjected to circular convolution to obtain a feature set. An inner product operation is performed on the left and right feature matrices in the feature set to obtain a matching score of the corresponding disparity map: A i,j ={f0(i+r i,j )·f1(i+d i,j )} Among them, f0 represents the left feature matrix of the left image, f1 represents the right feature matrix of the right image, and r i,j represents the jth candidate for the i-th pixel in the right eye, d i,j represents the jth candidate of the i-th pixel in the left eye, i represents the number of pixels, A i,j represents the matching score of the i-th pixel in the j-th candidate; For the matching score A i,j Iterate to obtain the first K best disparity values, and perform convolution training on the first K best disparity values to obtain corresponding disparity maps; The disparity map is subjected to a semantic segmentation network to obtain pixel-level semantic information of the image, including: The semantic segmentation network uses a fully convolutional network to perform end-to-end intensive training on the disparity map to obtain deep semantic features, performs a deconvolution operation on the deep semantic features and maps them to the original disparity map to extract the corresponding pixel-level semantic information; Performing motion consistency detection on the pose estimation data to obtain dynamic feature points in the image includes: The feature extractor Darknet is used to extract feature sequence data from the pose estimation data to form a feature point set U1, and the corresponding homogeneous coordinates of the feature point set U1 are obtained by matrix transformation; Calculate the basic matrix of the epipolar line of the homogeneous coordinates, and calculate the distance between the basic matrix and the pixel plane; The motion loss of the pose estimation data is determined by a classification loss function for the feature sequence data, and the classification loss function expression is: s x,y =b w (σ(t x )+c x )+b h (σ(t y )+c y ) Among them, b w 、b h Indicates the length of the predicted bounding box corresponding to the pose estimation data, t x ,t y represents the side length of the target border, c x 、c y represents the coordinate offset of the grid, σ(t x ),σ(t y ) represents the loss prediction of the target border length; A distance threshold is set according to the classification loss function, and when the distance between the basic matrix and the pixel plane is less than the distance threshold, the basic matrix is determined as a dynamic feature point; The point cloud fitting plane is obtained by clustering the dynamic feature points, including: The dynamic feature points are taken as an original point set Q, three non-collinear points {A(x1, y1, z1), B(x2, y2, z2), C(x3, y3, z3)} are randomly selected from the set Q to construct a plane to be fitted, and a point cloud plane equation of the plane to be fitted is obtained; Calculate the average distance from all points in the set Q to the plane to be fitted, take the average distance as a threshold, then calculate the distance from all sampling points to the plane to be fitted, and add the points whose distance is less than the threshold to the set Q; The number of points in the plane to be fitted is counted. If the number is greater than k, the fitting plane is considered valid. The average value of all points in the fitting plane is calculated, and the plane is refitted. The plane with the largest number of points in the plane to be fitted is selected as the point cloud fitting plane to be extracted.
2. A semantic point cloud map construction method according to claim 1, characterized in that: Performing dynamic feature detection on the pixel-level semantic information to obtain object pose estimation data in a dynamic scene includes: Inputting the pixel-level semantic information into a fully convolutional neural network to obtain image features, dividing the corresponding disparity map into S×S grids according to the image features, and predicting B bounding boxes and confidence values for each of the grids, wherein the confidence value indicates the probability of containing the target object in the bounding box and the matching degree of the corresponding target in the bounding box; Perform target prediction on each grid divided by the disparity map to generate S×S×B windows, calculate the maximum value corresponding to each window, remove the predicted border with a low confidence value by searching the local maximum value, obtain the predicted border with a high confidence value, perform dynamic detection on the target within the predicted border, and obtain the object's pose estimation data.
3. A semantic point cloud map construction method according to claim 2, characterized in that: The point cloud fitting plane is matched with similarity through a twin network to construct a point cloud submap, including: Using a twin network to perform similarity matching on the point cloud fitting plane, obtaining image A and image B through the similarity matching, and calculating the pose conversion between image A and image B; The image sequence collected for the image A is set as set G, the image sequence collected for the image B is set as set P, the image threshold M is set, and the images taken at equal intervals in the set G are set as G A , take out images at equal intervals from the set P and set them as P B ; Compare the G through the twin network A , P B For an image sequence in an image, if the similarity exceeds the image threshold M, the matching pair and the similarity are recorded; if the similarity does not exceed the image threshold M, no record is made; The matching pairs are sorted according to similarity, feature points of the two images of the matching pairs are extracted from high to low for matching, and a transfer matrix between the matching pairs is obtained; The pose transformations between adjacent matching pairs are spliced according to the transfer matrix to construct a point cloud submap.
4. A semantic point cloud map construction method according to claim 3, characterized in that: Acquiring path planning information of point cloud semantic information according to the point cloud sub-map, and acquiring a key frame image of a corresponding sub-map according to the path planning information, including: Rasterize the point cloud sub-map to obtain a node set S, and define a starting node v s 、Target node v t , with the starting node v s As the starting point, search for the nodes adjacent to it and add them to the set U, and select the node v with the shortest distance to the starting point from the set U. h , the node v h As the current node; During the search process, search for the node v h Adjacent node v that is not in set S n , the node v n Add to the set U, and for each node in the set U, calculate its distance to the starting node v s The distance d sm and to the current node v h The distance d sn ; Compare each node in the set U to the starting node v s The distance d sm From each node in the set U to the current node v h The distance d sn The size between them, updates the target node v t , repeat the above process until the current node is the target node v t until; Path planning is implemented according to all node information between the starting node and the current node, and a key frame image of a corresponding sub-map is obtained.
5. A semantic point cloud map construction method according to claim 4, characterized in that: The key frame image is subjected to spatial coordinate transformation of segmented pixels to obtain three-dimensional coordinates and construct a three-dimensional semantic point cloud map, including: Record the depth value corresponding to each pixel of the key frame image in the form of grayscale value, perform instance segmentation on the key frame image according to the depth value, project the pixel points in the image obtained after the instance segmentation into three-dimensional space, and obtain the three-dimensional coordinates corresponding to each pixel point; A global point cloud map is created for the key frame image using the visual synchronization and map construction algorithm SLAM, the posture information corresponding to the current key frame image is extracted through the three-dimensional coordinates, the posture information is accumulated into the global point cloud map, and a comprehensive three-dimensional semantic point cloud map is constructed.
