Lawn three-dimensional semantic map construction method based on semantic segmentation network model

By combining the semantic segmentation network model with the ORB-SLAM3 system, optimizing the ORB dictionary and performing semantic mask processing, the problem of poor positioning results in semantic segmentation of lawn scenes and 3D map construction is solved, and efficient semantic 3D map construction is achieved. and recognition, reducing computing resource consumption and improving system adaptability and recognition accuracy.

CN118736151APending Publication Date: 2024-10-01HENAN UNIV OF SCI & TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410859652.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing technology has problems in semantic segmentation and three-dimensional map construction of lawn scenes, such as poor positioning effect, insufficient semantic segmentation accuracy and generalization ability, high consumption of computing resources, and poor real-time performance, especially in large-scale scenes and indoor objects. identification aspects.

Method used

Combine the semantic segmentation network model with the improved ORB-SLAM3 system, optimize the ORB dictionary, use the depth camera and semantic segmentation network model to build a three-dimensional semantic map of the lawn, perform semantic mask image processing through the semantic segmentation network model, and combine the depth information to construct The three-dimensional semantic map of the lawn uses straight-through filtering, statistical filtering, voxel filtering and radius filtering to remove invalid information and reduce point cloud storage space.

Benefits of technology

It significantly reduces point cloud storage space, improves system loading speed and memory efficiency, enhances the adaptability of lawn scenes, improves semantic expression capabilities and recognition accuracy, and meets the needs of real-time navigation and control tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736151A_ABST
    Figure CN118736151A_ABST
Patent Text Reader

Abstract

A lawn three-dimensional semantic map construction method based on a semantic segmentation network model comprises the following steps that the semantic segmentation network model is integrated into an ORB-SLAM3 system, an ORB dictionary of the ORB-SLAM3 system is optimized, the ORB-SLAM3 is expanded, a three-dimensional semantic map of a lawn scene is established, and the three-dimensional semantic map of the lawn scene is obtained; the obtained lawn three-dimensional semantic map is subjected to straight-through filtering, statistical filtering, voxel filtering and radius filtering, and a final lawn three-dimensional semantic map is established. According to the method, the semantic segmentation network model is combined with the improved ORB-SLAM3, and the constructed lawn three-dimensional semantic map is small in storage space and less in invalid information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of path planning, and in particular to a method for constructing a three-dimensional lawn semantic map based on a semantic segmentation network model. Background Art

[0002] Semantic image segmentation has become a critical task in image processing. This rapid progress has led to a paradigm shift in the approach to many problems in many fields. Therefore, the prospect of using semantic image segmentation in an autonomous lawn mower is obvious. The resulting benefits are good localization in the environment, better path planning, improved efficiency, and reduced danger to humans and animals.

[0003] For gardening pruning robots, detecting a reasonable working area is a prerequisite for autonomous navigation. For the problem of semantic detection, in recent decades, many scholars around the world have proposed a large number of detection algorithms for semantic segmentation of images, such as PSPNet, Unet, HRNet, etc. Although semantic segmentation networks have been widely used in other aspects, there are relatively few studies on semantic segmentation of lawn scenes.

[0004] Unstructured 3D point cloud maps are of great significance for the perception of the surrounding environment, autonomous navigation and positioning, and autonomous scene understanding. For gardening pruning robots, unstructured 3D point cloud semantic segmentation technology is the key technology for achieving autonomous operation and autonomous navigation. 3D semantic point cloud maps can help gardening robots to recognize and detect obstacles, thereby providing robots with obstacle avoidance and motion path planning functions, greatly improving the operation and production efficiency of gardening robots. After semantically segmenting the captured images and obtaining the semantic information of different objects, the semantic mask images are directly mapped to the actual physical 3D coordinates to create a 3D point cloud map of the working environment.

[0005] Regarding the integration of building three-dimensional semantic maps and deep learning methods, Cui et al. integrated the improved YOLOv3 algorithm and proposed a new method for building three-dimensional semantic maps for mobile robots, combining the SLAM system to achieve posture estimation and three-dimensional environment construction. However, this method is currently limited to small areas and areas with obvious features, and the positioning effect of large-scale scenes needs to be improved. In addition, the accuracy and generalization ability of semantic segmentation of indoor objects need to be improved. Yajima et al. used the motion structure method to create a three-dimensional point cloud, and used deep learning to segment and classify highway assets to solve the labor-intensive and time-consuming problems in highway maintenance and infrastructure monitoring. However, this method currently relies on manual point cloud registration, which is both laborious and time-consuming.

[0006] Regarding the research on building semantic maps of different scales, Koch et al. focused on small-scale 3D reconstruction. In an environment that considers semantic attributes, they solved the orientation problem through discrete optimization to generate detailed, short and safe flight plans for drones, but the cost was too high. Zhang et al. proposed a large-scale outdoor 3D dense semantic map reconstruction method based on monocular vision. They achieved semantic segmentation through visual odometer, depth estimation and image segmentation system based on conditional random fields of deep learning, and finally generated a 3D semantic map of dense urban environment with global consistency, but it was time-consuming.

[0007] Simultaneous localization and mapping (SLAM) technology has made great progress in recent years, and many people are also conducting research on using visual SLAM to build environmental maps. Common sensors used in visual SLAM include monocular, binocular and depth cameras, which can all achieve map construction. Ding Kaixuan designed a robot semantic map construction and navigation system, used visual sensors to shoot semantic landmarks in the environment, generated semantic landmark point maps as semantic maps, used particle swarm filtering methods for robot positioning and path planning, and finally used the algorithm to conduct experiments on physical robots to verify the feasibility. Liu Yang built an autonomous navigation system for an omnidirectional four-wheel mobile robot, designed and implemented a visual SLAM system, applied Q-Learning to path planning, and made improvements. He conducted overall experiments and verified the robot's autonomous navigation capabilities. Rao Zunyu used adaptive thresholds to optimize the ORB-SLAM2 algorithm, and used the ORB-SLAM2 system to build a dense point cloud map, which increased the real-time performance of the map and reduced the map memory usage. However, the current semantic SLAM still requires a lot of computing resources for accurate semantic analysis, and its real-time performance is restricted. Summary of the invention

[0008] In order to solve the above technical problems, the present invention provides a method for constructing a lawn three-dimensional semantic map based on a semantic segmentation network model. The semantic segmentation network model is combined with the improved ORB-SLAM3. The constructed lawn three-dimensional semantic map has a small storage space and less invalid information.

[0009] In order to achieve the above technical purpose, the technical solution adopted is: a method for constructing a lawn three-dimensional semantic map based on a semantic segmentation network model, comprising the following steps: Step S1: Integrate the semantic segmentation network model into the ORB-SLAM3 system: Step S2: Optimize the ORB dictionary of the ORB-SLAM3 system. The specific steps are as follows: Step S2.1: Export all RGB image data in the bag package recorded in the lawn environment map construction process using the ROS system in the lawn environment; Step S2.2: Generate the original dictionary into a binary format with a suffix of .bin, and modify the loaded part of the original dictionary code to adapt to the newly generated binary dictionary; Step S2.3: Use the RGB image exported in step S2.1 to train the binary dictionary obtained in step S2.2; Step S3: Expand ORB-SLAM3 to establish a three-dimensional semantic map of the lawn scene. The specific steps are as follows: Step S3.1: Use the depth camera to obtain the lawn video and the accompanying lawn RGB picture and depth information, use the optimized ORB dictionary, and then use ORB-SLAM3 to extract ORB features from the lawn video; Step S3.2: Use the semantic segmentation network model to perform semantic segmentation on the RGB image collected by the depth camera to obtain a mask image; Step S3.3: combining the mask image and the depth information, selecting the point cloud within the range of 0.4m-4m from the depth camera to construct a 3D semantic map of the lawn; Step S3.4: The lawn three-dimensional semantic map obtained in step S3.3 is processed by through filtering, statistical filtering, voxel filtering and radius filtering to establish a final lawn three-dimensional semantic map.

[0010] The construction method of the semantic segmentation network model is: Step 1: Preprocess the collected lawn area images to obtain an image dataset; Step 2: Augment the image data set and divide the augmented image data into a training set and a test set; Step 3: Label image features: Classify each image in the training set into seven pixel categories according to different colors: background, lawn, tree trunk, boundary, person, obstacle, and bush, perform classification and labeling, and build a labeled dataset; Step 4: Build the improved DeepLabv3+ architecture. The specific steps are as follows: Step 4.1: Use the MobileNetV2 network to replace the ResNet50 traditional network in the DeepLabv3+ backbone network to build the main architecture; Step 4.2: Add the ECANet attention mechanism at the end of the main architecture; Step 5: Train the improved DeepLabv3+ architecture constructed in step 4 to obtain the improved semantic segmentation network model.

[0011] The specific implementation steps of step S1 are: Step S1.2: Use TorchScript to export the semantic segmentation network model into a form that can be used in ORB-SLAM3; Step S1.3: Call the semantic segmentation network model obtained in S1.2 through LibTorch in C++.

[0012] The invention has the following beneficial effects: (1) By changing the loading format of the ORB-SLAM3 system, the time for loading the dictionary was shortened by 96.1%. At the same time, the memory space occupied by the dictionary was reduced by more than half, which saved memory space and accelerated the system loading speed to a great extent, providing a more reliable foundation for lawn 3D map construction and path planning, enhancing the system's adaptability to lawn scenes, and providing strong support for navigation and control tasks in practical applications.

[0013] (2) After using the method proposed by the present invention, about 80% of the points on the map are filtered out, reducing the storage space occupied. The semantic point cloud map constructed by the present invention can identify the effective information in the working environment of the lawn mowing robot. Unnecessary point cloud information is eliminated, saving point cloud storage space, greatly improving the semantic expression ability of the map, and providing a strong guarantee for the future gardening mowing robot to determine the working area.

[0014] (3) The MobileNetV2 lightweight network is introduced into the backbone network of the improved semantic segmentation network model. This effectively reduces redundant calculations and memory accesses, reduces the model size, and speeds up reasoning. In terms of FPS, the recognition speed of MobileNetV2 is almost twice that of ResNet50.

[0015] (4) The ECA attention mechanism is introduced at the end of the backbone network of the improved semantic segmentation network model, which combines the attention to the channel, which greatly enhances the feature extraction ability of the model.

[0016] (5) The improved semantic segmentation network model MIoU maintains a high level of accuracy and meets the map construction requirements of the ORB-SLAM3 system.

[0017] (6) The semantic segmentation network (MM-ED network) can be easily integrated into the ORB-SLAM3 system, providing an efficient solution for real-time segmentation tasks.

[0018] (7) By using TorchScript and LibTorch, you can fully leverage the power of PyTorch and achieve high-performance reasoning of models in different environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 To improve the Deeplabv3+ network technology roadmap; Figure 2This is the improved semantic segmentation network architecture diagram; Figure 3 This is the network block diagram of MobileNetV2; Figure 4 It is the inverted residual structure diagram; Figure 5 This is the structure diagram of the ECANet attention mechanism; Figure 6 For lawn pictures and labeled diagrams; Figure 7 It is the framework diagram of the ORB-SLAM3 system of the present invention; Figure 8 It is the deployment and calling process diagram of MM-ED model; Fig. 9 To improve the point cloud processing workflow diagram; Fig.10 It is a 3D semantic point cloud map of the lawn; Fig.11 Comparison chart of 3D semantic point cloud and RGB point cloud; Fig.12 A comparison chart of the 3D semantic map built using the improved Deeplabv3+ and the 3D semantic map built using the traditional Deeplabv3+. DETAILED DESCRIPTION

[0020] The preferred embodiments of the invention are given below in conjunction with the accompanying drawings to explain the technical solution of the present invention in detail. Here, the corresponding drawings are given to explain the present invention in detail. It should be particularly noted that the preferred embodiments described here are only used to illustrate and explain the present invention, and are not used to limit or restrict the present invention.

[0021] like Fig. 9 As shown, a method for constructing a lawn three-dimensional semantic map based on a semantic segmentation network model includes the following steps: Step S1: Integrate the semantic segmentation network model into the ORB-SLAM3 system. The semantic segmentation network model can adopt the semantic segmentation network model in conventional technology, or the present invention can be improved to MM-ED model: Step S2: Optimize the ORB dictionary of the ORB-SLAM3 system. The specific steps are as follows: Step S2.1: Export all RGB image data in the bag package recorded in the lawn environment map construction process using the ROS system in the lawn environment; Step S2.2: Generate the original dictionary into a binary format with a suffix of .bin, and modify the loaded part of the original dictionary code to adapt to the newly generated binary dictionary.

[0022] The dictionary in the traditional ORB-SLAM3 system is built based on the DBoW3 library, which is used to speed up the brute force matching rate in the algorithm in ORB feature point matching. Often in the initial stage of system operation, it is necessary to read the dictionary, but the original dictionary format is in the form of txt, which will take up a lot of content and the reading speed is extremely slow, which is not convenient for algorithm operation and debugging. This article generates the original dictionary in a binary format with the suffix .bin, and modifies the word bag loading part in the code to adapt to the newly generated binary word bag file. The performance comparison of the two formats of dictionaries is shown in Table 1-1.

[0023] Table 1-1 Comparison of performance of two formats of dictionaries Bag of Words format Bag of words loading time / ms Bag of words memory size / MB txt format 4390 142 bin format 170 44 Reduce the ratio 96.1% 69.0% As can be seen from the table above, by changing the loading format of the ORB-SLAM3 system, the time to load the dictionary is shortened by 96.1%, and the memory space occupied by the dictionary is reduced by 69.0%, which saves memory space and speeds up the system loading speed to a great extent.

[0024] Through the above optimization measures, this study successfully optimized the ORB dictionary model, providing a more reliable foundation for lawn three-dimensional map construction and path planning, enhancing the system's adaptability to lawn scenes, and providing strong support for navigation and control tasks in practical applications.

[0025] Step S2.3: Use the RGB image exported in step S2.1 to train the binary dictionary obtained in step S2.2; Step S3: Expand ORB-SLAM3 to build a 3D semantic map of the lawn scene. The specific steps are as follows: Step S3.1: Use the depth camera to obtain the lawn video and the accompanying lawn RGB picture and depth information, use the optimized ORB dictionary, and then use ORB-SLAM3 to extract ORB features from the lawn video; Step S3.2: Use the semantic segmentation network model to perform semantic segmentation on the RGB image collected by the depth camera to obtain a mask image; Step S3.3: combining the mask image and the depth information, selecting the point cloud within the range of 0.4m-4m from the depth camera to construct a 3D semantic map of the lawn; Step S3.4: The lawn 3D semantic map obtained in step S3.3 is processed by through filtering, statistical filtering, voxel filtering and radius filtering to establish the final lawn 3D semantic map. After all RGB images are processed, the point cloud map of the entire area is obtained, and then the entire point cloud map is processed by through filtering, statistical filtering, voxel filtering and radius filtering, which can better eliminate the influence of outliers and noise on the map.

[0026] Based on this semantic information, a 3D semantic map of the lawn will be constructed, so that the map contains not only geometric structure but also semantic information. This not only improves the expressiveness of the map, but also significantly reduces the storage space of the point cloud, and optimizes the expressive efficiency of the map by removing many irrelevant point clouds.

[0027] As a simple and efficient point cloud filtering method, the point cloud through-filter algorithm has the ability to filter out points in the point cloud that are not within the value range according to the dimension and value range specified by the user. The algorithm can effectively remove noise, background, and points that do not meet specific conditions. It is particularly suitable for the case where the approximate range of the point cloud is known. By eliminating invalid points that exceed the predetermined range, the subsequent processing flow is simplified and the operation efficiency is improved.

[0028] The statistical filtering algorithm is used to remove obvious outliers. The characteristic of outliers is that they are sparsely distributed in space. Considering the characteristics of outliers, it can be defined that the point cloud is less than a certain density, that is, the point cloud is invalid. The specific steps are to calculate the average distance from each point to its nearest k points. This paper sets 50 points. By assuming that the distance distribution of its points in the point cloud is a Gaussian distribution with a mean and standard deviation, according to the given mean and variance, points with an average distance outside the standard range can be defined as outliers and removed from the data.

[0029] Voxel filtering reduces the amount of point cloud data by dividing the point cloud space into voxel grids and replacing all points in each voxel with the centroid or other representative points in each voxel. The size of the voxel grid used in this paper is 0.3cm. After testing, it is found that using this voxel grid size does not consume much system resources and can obtain better point cloud effects.

[0030] The radius filtering algorithm selects a point cloud as the center of the circle and calculates the number of point clouds within the specified radius. If it is lower than a certain threshold, it means that the current number of point clouds is relatively sparse, which may be some outliers, so these points will be removed. The advantage of this algorithm is its efficient execution speed, but the disadvantage is also obvious, that is, after multiple sequence iterations, the remaining points will be relatively concentrated, resulting in dense data distribution.

[0031] like Figure 1As shown in the figure, in order to train the model for the lawn environment, the improved semantic segmentation network model was used. This study produced a lawn dataset. In this study, the backbone network in DeepLabv3+ was replaced from ResNet50 to MobileNetV2 to reduce the number of network parameters and increase the recognition speed. In addition, the ECANet attention mechanism was introduced to improve the accuracy of the neural network. The improved semantic segmentation network is called MM-ED. By conducting backbone network comparison experiments, attention mechanism comparison experiments and ablation experiments, the superiority of the semantic segmentation network architecture proposed in the present invention in identifying objects in a lawn environment is verified.

[0032] This paper proposes an improvement scheme for the existing DeepLabv3+ model, which has problems such as large number of model parameters, inconvenient transplantation and poor real-time performance. The improved network structure is as follows Figure 2 As shown in the figure, the improved lightweight real-time multi-object semantic segmentation detection network is called Multiclass MobileNetV2 ECA DeepLabv3+ (MM-ED). The improvements are mainly reflected in the following two aspects: In the backbone network, the MobileNetV2 lightweight network is introduced. This effectively reduces redundant calculations and memory accesses, reduces the model size, and speeds up the inference speed. The ECA attention mechanism is introduced at the end of the backbone network, which combines the attention to the channel, which greatly enhances the feature extraction ability of the model. Considering that the equipment carried by the gardening pruning robot equipment usually has limited computing power and small storage space, the model improvement scheme proposed in the present invention is optimized accordingly. By reducing the size of the backbone network, it is conducive to efficient operation on such platforms. In addition, when computing resources are limited, the addition of the attention mechanism can improve the accuracy of model recognition.

[0033] The MobileNet network proposes to use depthwise separable convolution instead of standard convolution, which reduces the amount of computation and model parameters. Depthwise separable convolution decomposes ordinary convolution into depthwise convolution and point convolution. For the first time, the input features are decomposed into multiple single-channel features, and a 3×3 convolution kernel is used to convolve each channel to extract features, which is called depthwise convolution. Then, point convolution convolves the result of the depthwise convolution with a 1×1 convolution to assemble the output features. Compared with standard convolution, depthwise separable convolution can greatly reduce the amount of computation, but the prediction accuracy is reduced less. The network architecture and inverted residual structure of MobileNetV2 are shown in Figure 2. Figure 3 and 4As shown in the figure. Based on the depthwise separable convolution, MobileNetV2 introduces the inverted residual structure and the last layer adopts the linear layer to further improve the network performance. The inverted residual structure mainly consists of three parts. First, 1×1 convolution is used to increase the dimension of the input feature, then 3×3 depthwise separable convolution is used for feature extraction, and then 1×1 convolution is used for dimensionality reduction. Compared with the residual structure, the inverted residual structure avoids the disadvantage that the network only extracts low-dimensional features well when the number of input feature channels is small, while losing high-dimensional feature information. In order to avoid the destruction of the feature by the ReLU function, 1×1 convolution is used to increase the dimension before the 3×3 network structure, and after the 3×3 network structure, 1×1 convolution is used to reduce the dimension, and the ReLU activation function is changed to a linear function to reduce the loss of useful network information.

[0034] ECANet is an image attention mechanism that focuses on enhancing the model's attention to edge information to improve the performance of image processing tasks. It introduces a contextual attention mechanism so that the model can better understand the relationship between pixels in the image and help the model better capture contextual information in the image. ECANet enhances the focus on edge information and improves the model's ability to perceive details. It introduces an adaptive pooling mechanism to dynamically adjust the size of attention so that the model can better adapt to objects or details of different sizes. The network structure of the ECANet attention mechanism is as follows: Figure 5 As shown. k is the optimal range of channel information interaction, that is, the convolution kernel size of one-dimensional convolution, and the calculation formula is: In the formula, C is the number of characteristic channels, and in the present invention, γ and b are set to 2 and 1. These parameters are used to adjust the ratio of the number of channels C to the kernel size k. When the number of channels is large, the kernel size k increases with C, and vice versa, when the number of channels is small, the kernel size k decreases with C. This method can effectively interact between different channels, thereby promoting fusion.

[0035] The present invention divides the collected images into 7 pixel categories: Background (black), Lawn (red), Trunk (green), Edge (yellow), People (blue), Obstacle (purple), Bush (cyan). The original image is a 24-bit RGB image, and its corresponding visualization label is as follows: Figure 6As shown. The labeling is explained according to the working conditions of common gardening pruning robots. The label Lawn is the robot's working area, and the label Edge defines the robot's working boundary. After that, the robot's weeding tasks are all carried out within the boundary. The yellow boundary area acts as a traditional electronic fence. In the robot's working area, there is not only lawn. Sometimes there are objects with labels Bushes, Obstacles or Trunks in the lawn area. In the present invention, these three objects are taken as representatives of obstacles. These are all prohibited areas for robots. During the pruning process of the working robot, there will always be a label People appearing nearby. It may be to supervise the robot's work, or it may just be passing by. Compared with other static objects, the label People is dynamic and special, so it needs to be marked separately.

[0036] The present invention combines the proposed MM-ED model and ORB-SLAM3 to further explore the 3D semantic map of unstructured lawn scenes. The ORB-SLAM3 framework has three interfaces: monocular, binocular and RGB-D, and can be widely used in a variety of visual sensor types. The present invention uses the RGB-D mode of ORB-SLAM3. The visual ORB-SLAM3 system extracts ORB features from the color image captured by D455, uses the DeepLabv3+ model to perform semantic segmentation on the collected RGB images to obtain mask images, and establishes a three-dimensional semantic map. The thread structure of the framework is as follows Figure 7 shown.

[0037] Since the MM-ED lightweight real-time semantic segmentation network is implemented based on PyTorch, and the ORB-SLAM3 system cannot directly call the PyTorch model, the algorithm needs to be exported to a form that can be used in ORB-SLAM3. To this end, this study chose to use TorchScript, a tool of PyTorch, which is used to convert the model into an efficient intermediate representation to improve model performance and deployment efficiency. In the present invention, the inference model is first converted to the TorchScript format, and called through the LibTorch method in C++, and then the RGB image is processed and converted into a semantic image, thereby achieving high-performance reasoning of the model in different environments. The deployment and calling process of the model is as follows Figure 8 shown.

[0038] Fig. 9The improved processing flow of the point cloud map of the present invention is shown. When the original dense point cloud is constructed, the video is first acquired by the camera, and then the key frame information is extracted from the video by ORB-SLAM3. By combining the RGB image and the depth information in the key frame, a dense point cloud can be obtained. In the new processing flow, the RGB image is sent to the MM-ED network model proposed in this study to obtain a mask image, and the mask image and the depth information are combined to obtain a 3D semantic map. The point cloud construction system of the present invention not only considers the geometric structure of the map, but also introduces semantic information by using the MM-ED neural network to process the RGB image. This step helps to identify the area with semantic information in the image and generate the corresponding mask map. Then, this study will construct a point cloud map based on this semantic information, so that the map not only contains geometric structure, but also has semantic information. This not only improves the expressive ability of the map, but also significantly reduces the storage space of the point cloud, and optimizes the expression efficiency of the map by removing many irrelevant point clouds.

[0039] Whether it is an RGB image or a mask image, it needs to be converted into a point cloud map by adding depth information. Since the D455 camera used in the present invention can simultaneously capture two-dimensional color images and depth images, it is relatively easy to construct a point cloud map. Now, using the conversion of RGB images to point cloud information as an example, how to convert is introduced in detail. Each image is composed of many pixels, and the sequence X = {x1, x2, ..., x n ,} indicates that the image is composed of a large number of pixels, where x i =[x,y,z] represents the three-dimensional coordinates of the empty point. According to the principle of camera imaging: Among them, s is the scale factor between the depth value and the spatial distance, C is the camera internal parameter, R is the rotation matrix of the camera, and t is the translation matrix of the camera. Then the point cloud is constructed, and the main formula used is as follows: where f x ,f y ,c x ,c y is the camera internal parameter, x, y, z are the image coordinate system coordinates, u, v are the image coordinates, d is the depth value, and s is the ratio coefficient between the actual depth and the depth value d. The point cloud formula for converting the camera coordinate system to the global coordinate system is as follows: Where X w,j To transform the point cloud into the global coordinate system, X w,ci is the pose of the i-th key frame, X ci,yis the point cloud of the i-th key frame in the camera coordinate system. The converted point cloud map is as follows Fig.10 shown.

[0040] The present invention uses ORB-SLAM3 to construct a dense point cloud. The original input image is RGB information. If the MM-ED semantic segmentation model proposed by the present invention is not used, the RGB dense point cloud map is established. When shooting a lawn in an outdoor environment, it can be seen that there is a lot of messy information in the lawn environment, which is meaningless for demarcating the working area of ​​the gardening pruning robot. If the RGB map is used, not only the trunk but also the crown can be identified. Figure 10 The map is quite messy, but the main job of a gardening pruning robot is to weed the lawn, so it is meaningless to include the tree crown in the dense point cloud map. It can be seen that the semantic point cloud map constructed by the present invention can identify effective information in the working environment of the gardening pruning robot, and unnecessary point cloud information is eliminated, which greatly improves the semantic expression ability of the map and provides a strong guarantee for future gardening pruning robots to determine their working areas. At the same time, while eliminating invalid point cloud information, the semantic map can also greatly save point cloud storage space. Comparison of the lawn three-dimensional semantic point cloud map and the RGB point cloud. Fig.11 As shown in the figure, we can see that there are many messy tree trunks in the color map, which are invalid information, but these are removed in the semantic map. Fig.12 The comparison between the lawn 3D semantic point cloud map (b) created by Deeplabv3+ before improvement and the lawn 3D semantic point cloud map (a) after improvement of the present invention is also shown (c). Since the semantic segmentation recognition speed of the unimproved method is slow, the recognition of some areas is not very good, and some areas may not be recognized, resulting in gaps in the map. However, (a) and (b) can effectively recognize lawn environment information and eliminate invalid point cloud information, saving point cloud storage space. (a) is faster than (b) in recognition, and the recognition range is more complete and accurate.

[0041] The above are only preferred embodiments of the present invention and are not intended to limit or restrict the present invention. For researchers or technicians in this field, the present invention may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection declared by the present invention.

Claims

1. A method for constructing a lawn three-dimensional semantic map based on a semantic segmentation network model, characterized in that: The following steps are involved: Step S1: Integrate the semantic segmentation network model into the ORB-SLAM3 system: Step S2: Optimize the ORB dictionary of the ORB-SLAM3 system. The specific steps are as follows: Step S2.1: Export all RGB image data in the bag package recorded in the lawn environment map construction process using the ROS system in the lawn environment; Step S2.2: Generate the original dictionary into a binary format with a suffix of .bin, and modify the loaded part of the original dictionary code to adapt to the newly generated binary dictionary; Step S2.3: Use the RGB image exported in step S2.1 to train the binary dictionary obtained in step S2.2; Step S3: Expand ORB-SLAM3 to build a 3D semantic map of the lawn scene. The specific steps are as follows: Step S3.1: Use the depth camera to obtain the lawn video and the accompanying lawn RGB image and depth information, use the optimized ORB dictionary, and then use ORB-SLAM3 to extract ORB features from the lawn video; Step S3.2: Use the semantic segmentation network model to perform semantic segmentation on the RGB image collected by the depth camera to obtain a mask image; Step S3.3: combining the mask image and the depth information, selecting the point cloud within the range of 0.4m-4m relative to the depth camera to construct a 3D semantic map of the lawn; Step S3.4: The lawn three-dimensional semantic map obtained in step S3.3 is processed by through filtering, statistical filtering, voxel filtering and radius filtering to establish a final lawn three-dimensional semantic map.

2. A method for constructing a lawn three-dimensional semantic map based on a semantic segmentation network model as claimed in claim 1, characterized in that: The construction method of the semantic segmentation network model is: Step 1: Preprocess the collected lawn area images to obtain an image dataset; Step 2: Augment the image data set and divide the augmented image data into a training set and a test set; Step 3: Label image features: Classify each image in the training set into seven pixel categories according to different colors: background, lawn, tree trunk, boundary, person, obstacle, and bush, perform classification and labeling, and build a labeled dataset; Step 4: Build the improved DeepLabv3+ architecture. The specific steps are as follows: Step 4.1: Use the MobileNetV2 network to replace the ResNet50 traditional network in the DeepLabv3+ backbone network to build the main architecture; Step 4.2: Add the ECANet attention mechanism at the end of the main architecture; Step 5: Train the improved DeepLabv3+ architecture constructed in step 4 to obtain the improved semantic segmentation network model.

3. The method for constructing a lawn three-dimensional semantic map based on a semantic segmentation network model according to claim 1, characterized in that: The specific implementation steps of step S1 are: Step S1.2: Use TorchScript to export the semantic segmentation network model into a form that can be used in ORB-SLAM3; Step S1.3: Call the semantic segmentation network model obtained in S1.2 through LibTorch in C++.

Citation Information

Cited By

  • Floor sweeping robot and control method, device, equipment and product

    CN119867600A