Loopback detection method and device, equipment and storage medium
By obtaining the intersection of historical and current semantic maps and generating a semantic grid pyramid, the problem of low accuracy of traditional loop closure optimization in signal difference scenarios is solved, and accurate loop closure detection is achieved in scenarios such as underground and urban canyons.
Patent Information
- Application Number
- CN202410772084.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-10-01
AI Technical Summary
Traditional loopback optimization methods have poor signal stability in scenes such as underground and urban canyons, resulting in poor loopback detection accuracy in BEV semantic maps.
By obtaining the intersection of the historical semantic map and the current semantic map, semantic rasterization is performed to generate a semantic raster pyramid, and the pyramid is used for loop detection, which is suitable for scenarios with poor signal transmission.
There is no need to add additional sensors to accurately perform loop detection. It is suitable for scenarios such as underground and urban canyons, and improves the accuracy of loop detection on BEV semantic maps.
Smart Images

Figure CN118736285A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of map construction technology, and in particular to a loop detection method, device, equipment and storage medium. Background Art
[0002] In the field of intelligent driving, visual semantic SLAM (Simultaneous Localization and Mapping) technology based on BEV (Bird Eye View) is widely used in positioning and path planning in this field because the output map has advantages such as large viewing angle, low cost and stable features. SLAM will continuously accumulate errors during the mapping process, so it is necessary to detect whether the scene where the current vehicle is located coincides with the historical scene, and reduce the accumulated error of the system by eliminating the error during the overlap. This method is called loop optimization technology.
[0003] Traditional loop closure optimization methods usually perform loop closure detection by building semantic maps. However, in scenes such as underground and urban canyons, the sensor signal stability is poor. In addition, traditional loop closure optimization methods are usually used in scenes with rich visual textures, while BEV semantic maps usually do not have rich textures, and the accuracy of loop closure detection is poor. Summary of the invention
[0004] The present invention provides a loop detection method, device, equipment and storage medium to solve the problem of poor accuracy of loop detection.
[0005] In a first aspect, the present invention provides a loop detection method, comprising:
[0006] Acquire a historical semantic map and a current semantic map, determine an intersection of the historical semantic map and the current semantic map, and use the intersection to determine a target semantic map;
[0007] Performing semantic rasterization processing on the target semantic map to obtain a target semantic raster map, wherein the target semantic raster map contains the semantic type values of the objects in the target semantic map;
[0008] A semantic grid pyramid of the target semantic grid map is generated according to the semantic type value of the object, and loop detection is performed using the semantic grid pyramid, wherein the semantic grid pyramid contains semantic grid maps of multiple resolutions.
[0009] In a second aspect, the present invention provides a loop detection device, comprising:
[0010] A target map determination module, used to obtain a historical semantic map and a current semantic map, determine an intersection of the historical semantic map and the current semantic map, and determine a target semantic map using the intersection;
[0011] A grid map determination module, configured to perform semantic gridding processing on the target semantic map to obtain a target semantic grid map, wherein the target semantic grid map contains semantic type values of objects in the target semantic map;
[0012] The loop detection module is used to generate a semantic grid pyramid of the target semantic grid map according to the semantic type value of the object, and use the semantic grid pyramid to perform loop detection, wherein the semantic grid pyramid contains semantic grid maps of multiple resolutions.
[0013] In a third aspect, the present invention provides an electronic device, the electronic device comprising:
[0014] at least one processor;
[0015] and a memory communicatively coupled to the at least one processor;
[0016] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the loop detection method of the first aspect.
[0017] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions, which are used to enable a processor to implement the loop detection method of the first aspect when executed.
[0018] The loop detection scheme provided by the present invention obtains a historical semantic map and a current semantic map, determines the intersection of the historical semantic map and the current semantic map, and uses the intersection to determine a target semantic map, performs semantic rasterization on the target semantic map to obtain a target semantic raster map, wherein the target semantic raster map contains the semantic type value of the object in the target semantic map, generates a semantic raster pyramid of the target semantic raster map according to the object semantic type value, and performs loop detection using the semantic raster pyramid, wherein the semantic raster pyramid contains semantic raster maps of multiple resolutions. By adopting the above technical scheme, there is no need to add additional sensors or other equipment, a target semantic map is established using the historical semantic map and the current semantic map, and then a semantic raster pyramid is generated using the raster map of the target semantic map, and finally, the image in the semantic raster pyramid can be used to accurately perform loop detection, which is suitable for scenes with poor signal transmission such as underground and urban canyons, as well as scenes for loop detection of BEV semantic maps.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a flow chart of a loop detection method provided according to Embodiment 1 of the present invention;
[0022] Figure 2 is a flow chart of a loop detection method provided according to Embodiment 2 of the present invention;
[0023] Figure 3 This is a schematic diagram of mapping effects of a historical semantic map and a current semantic map provided according to the second embodiment of the present invention;
[0024] Figure 4 is a schematic diagram of a target semantic grid map provided according to the second embodiment of the present invention;
[0025] Figure 5 is a schematic diagram of a grid in a preset fuzzy window provided according to Embodiment 2 of the present invention;
[0026] Figure 6 is a schematic diagram of the structure of a loop detection device provided according to Embodiment 3 of the present invention;
[0027] Figure 7 It is a schematic diagram of the structure of an electronic device provided according to Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In the description of the present invention, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are an "or" relationship. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiment 1
[0031] Figure 1 A flowchart of a loop detection method is provided for Embodiment 1 of the present invention. This embodiment is applicable to the case of loop detection. The method can be performed by a loop detection device. The loop detection device can be implemented in the form of hardware and / or software. The loop detection device can be configured in an electronic device. The electronic device can be composed of two or more physical entities or one physical entity.
[0032] like Figure 1 As shown, a loop detection method provided in the first embodiment of the present invention specifically includes the following steps:
[0033] S101 : Acquire a historical semantic map and a current semantic map, determine an intersection of the historical semantic map and the current semantic map, and use the intersection to determine a target semantic map.
[0034] In this embodiment, the obtained positions of the historical semantic map and the current semantic map can be used to determine the intersection of the two. For example, the intersection of the historical semantic map and the current semantic map is determined in a preset coordinate system. Then the target semantic map is determined using the intersection, such as determining the historical semantic map within a preset range of the intersection and its extension as the target semantic map. If there are multiple areas in the intersection, the union of these intersections can be taken first, and the historical semantic map within the preset range of the union and its extension can be determined as the target semantic map. Among them, both the historical semantic map and the current semantic map can be bird's-eye views.
[0035] S102: Perform semantic rasterization processing on the target semantic map to obtain a target semantic raster map, wherein the target semantic raster map contains semantic type values of objects in the target semantic map.
[0036] In this embodiment, the target semantic map is marked with an object semantic type value of an object, such as an object semantic type value of a zebra crossing. The target semantic map can be semantically rasterized to obtain a target semantic grid map. The grid value of the target semantic grid map can be the object semantic type value marked in the target semantic map, and the object semantic type value is used to indicate whether the current object is of a preset semantic type.
[0037] S103 , generating a semantic grid pyramid of the target semantic grid map according to the semantic type value of the object, and performing loop detection using the semantic grid pyramid, wherein the semantic grid pyramid includes semantic grid maps of multiple resolutions.
[0038] In this embodiment, the semantic type value of the object in the target semantic grid map can be fuzzy processed to obtain semantic grid maps of multiple resolutions. The semantic grid maps of multiple resolutions can be used to generate a semantic grid pyramid, and then the semantic grid pyramid can be used to perform loop detection. For example, the semantic grid pyramid can be used to determine the new pose that best matches the historical semantic map and the current semantic map, thereby completing loop detection.
[0039] The loop detection method provided by the embodiment of the present invention obtains a historical semantic map and a current semantic map, determines the intersection of the historical semantic map and the current semantic map, and uses the intersection to determine a target semantic map, performs semantic rasterization processing on the target semantic map to obtain a target semantic raster map, wherein the target semantic raster map contains the semantic type value of the object in the target semantic map, generates a semantic raster pyramid of the target semantic raster map according to the object semantic type value, and performs loop detection using the semantic raster pyramid, wherein the semantic raster pyramid contains semantic raster maps of multiple resolutions. The technical solution of the embodiment of the present invention does not require the addition of additional sensors and other equipment, uses the historical semantic map and the current semantic map to establish a target semantic map, then uses the raster map of the target semantic map to generate a semantic raster pyramid, and finally uses the image in the semantic raster pyramid to accurately perform loop detection, which is suitable for scenes with poor signal transmission such as underground and urban canyons, as well as scenes for loop detection of BEV semantic maps.
[0040] Optionally, generating a semantic grid pyramid of the target semantic grid map according to the object semantic type value includes: using a preset convolution operation to fuzzy the object semantic type value in the target semantic grid map, and generating a semantic grid pyramid using the result of the fuzzy processing.
[0041] Specifically, the preset convolution operation can be used to perform multiple rounds of fuzzification processing on the semantic type values of objects in the target semantic grid map to obtain semantic grid maps of multiple resolutions. Among them, the semantic grid map with the highest resolution in the semantic grid pyramid is the target semantic grid map.
[0042] Embodiment 2
[0043] Figure 2 This is a flow chart of a loop detection method provided in Embodiment 2 of the present invention. The technical solution of the embodiment of the present invention is further optimized on the basis of the above-mentioned optional technical solutions, and a specific method of ... is given.
[0044] Optionally, the method of using a preset convolution operation to fuzzify the semantic type values of the objects in the target semantic grid map, and using the result of the fuzzification process to generate a semantic grid pyramid, includes: generating a preset fuzzy window for each layer of the semantic grid pyramid, wherein the sizes of the preset fuzzy windows corresponding to different layers of the semantic grid pyramid are different; determining multiple grid values within the current preset fuzzy window for multiple positions of the preset fuzzy window in the target semantic grid map, and determining the maximum value of the semantic type values of the objects of each semantic type in the multiple grid values; and generating semantic grid maps of multiple resolutions according to the maximum value to obtain a semantic grid pyramid. The advantage of such a setting is that by setting a different preset fuzzy window for each layer of the semantic grid pyramid, and determining the maximum value of the semantic type value of each semantic type of the objects contained in the grid values in each preset fuzzy window, a semantic grid pyramid containing multiple low-resolution semantic grid maps is quickly generated.
[0045] Optionally, the target semantic map is subjected to semantic rasterization processing to obtain a target semantic raster map, including: rasterizing the target semantic map to obtain a raster map, wherein the raster resolution of the raster map is consistent with the resolution of the target semantic map; traversing each grid in the raster map, and generating a target semantic raster map according to the object semantic type value in the current grid, wherein the object semantic type at least includes the semantic type of the ground feature. The advantage of such a setting is that by rasterizing the target semantic map and traversing the rasterization to obtain the grids in the raster map, the object semantic type value in the target semantic map is accurately mapped to the raster map, so as to obtain a target semantic raster map containing object semantic type feature information.
[0046] Optionally, the determination of the intersection of the historical semantic map and the current semantic map, and the determination of the target semantic map using the intersection, includes: mapping the current semantic map to the world coordinate system in a first preset search window according to the position of the current semantic map; mapping the historical semantic map to the world coordinate system in a second preset search window according to the position of the historical semantic map; and determining the target semantic map in the world coordinate system using a historical semantic map that has an intersection with the current semantic map. The advantage of such a setting is that by accurately mapping the historical semantic map and the current semantic map to a third-party coordinate system using the position, the intersection of the historical semantic map and the current semantic map can be accurately determined, and the historical semantic map to be searched, i.e., the target semantic map, can be determined using the intersection.
[0047] like Figure 2 As shown, a loop detection method provided by Embodiment 2 of the present invention specifically includes the following steps:
[0048] S201, acquiring a historical semantic map and a current semantic map, and mapping the current semantic map to a world coordinate system in a first preset search window according to the position and posture of the current semantic map.
[0049] For example, Figure 3 FIG. 1 is a schematic diagram of a mapping effect of a historical semantic map and a current semantic map. The size of the first preset search window can be preset (eg Figure 3 The current semantic map is mapped to the world coordinate system in the form of a rectangular window using the position and posture of the current semantic map. Figure 3 The current local map in can be understood as the current semantic map within the first preset search window, that is, the local map of the current semantic map, and the current local coordinate system is the coordinate system of the current semantic map.
[0050] S202: Mapping the historical semantic map to the world coordinate system in a second preset search window according to the position and posture of the historical semantic map.
[0051] For example, Figure 3 As shown, the historical semantic map can be mapped to the world coordinate system in the form of a second preset search window by using the position of the historical semantic map. The sizes of the first preset search window and the second preset search window can be the same. Figure 3 The historical local map in can be understood as the historical semantic map within the second preset search window, that is, the local map of the historical semantic map, and the historical local coordinate system is the coordinate system of the historical semantic map.
[0052] S203: Determine a target semantic map in the world coordinate system by using a historical semantic map that intersects with the current semantic map.
[0053] Specifically, after executing step 201, that is, after determining the union of the current semantic maps in the first preset search window (the area corresponding to the union is the search range), the intersection area of the historical semantic map with the search range can be determined. For example, the historical semantic map corresponding to the minimum bounding rectangle of the union can be determined as the target semantic map. Figure 3 The search posture in can be understood as the posture of the first preset search window and the second preset search window in the process of searching for the second preset search window that has an intersection with the first preset search window.
[0054] S204: Rasterize the target semantic map to obtain a raster map.
[0055] The grid resolution of the grid map is consistent with the resolution of the target semantic map.
[0056] Specifically, objects on the ground include lane lines, parking space lines, arrows, and zebra crossings. The target semantic map can be rasterized, and the coordinate system of the target semantic map can be aligned with the grid coordinate system of the grid map. During rasterization, the vertical resolution of the target semantic map is consistent with the grid step size in the vertical axis direction of the grid map coordinate system, and the horizontal resolution of the target semantic map is consistent with the grid step size in the horizontal axis direction of the grid map coordinate system. If the grid step size is Step = (dx, dy), the coordinates in the target semantic map corresponding to the grid coordinates (xg, yg) of the grid map are (xg*Step.dx, yg*Step.dy).
[0057] S205 , traversing each grid in the grid map, and generating a target semantic grid map according to the semantic type value of the object in the current grid.
[0058] The object semantic type at least includes the semantic type of the ground feature.
[0059] Specifically, each grid in the grid map may be traversed so that the value of each grid is a semantic type value contained within a grid size range at a corresponding position in the target semantic map.
[0060] Optionally, if the object semantic type value is a Boolean type value, each grid of the target semantic grid map includes at most one true Boolean type value.
[0061] For example, if the object semantic type value is a Boolean type value, the data structure of the i-th grid value Pixel_i of the target semantic grid map can be specifically expressed as:
[0062] {Bool class_1, Bool class_2,…, Bool class_k}
[0063] class_k represents the kth semantic type of the ground feature, where Bool represents the Boolean type. When Bool class_k = 1, it means "true", which means that the grid contains an object of this category. When Bool class_k = 0, it means "false", which means that the grid does not contain an object of this category. If all semantic types in Pixel_i are "false", it means that the grid is the background. Figure 4 is a schematic diagram of a target semantic grid map. Figure 4 As shown, if the data structure of Pixel_i is represented as:
[0064] Pixel_i{Bool zebra, Bool lane, Bool parkingspace, Bool arrow}
[0065] Among them, Bool zebra is the semantic type of zebra crossing, Bool lane is the semantic type of lane line, Boolparkingspace is the semantic type of parking space line, and Bool arrow is the semantic type of arrow. Figure 4 In the example, 1 means "true" and 0 means "false". The blue line area is the lane line, and its corresponding grid value is {0, 1, 0, 0}. The green line area is the arrow, and its corresponding grid value is {0, 0, 0, 1}. The red line area is the parking space line, and its corresponding grid value is {0, 0, 1, 0}.
[0066] Optionally, after traversing each grid in the grid map and generating a target semantic grid map according to the semantic type value of the object in the current grid, it may also include: performing edge extraction processing on the target semantic grid map to obtain a new target semantic grid map, wherein the new target semantic grid map contains the semantic type value at the edge of the object in the target semantic grid map, and the semantic type value at the non-edge is the background value. The advantage of such a setting is that it reduces the subsequent calculation amount and improves the efficiency of loop detection.
[0067] S206 : Generate a preset fuzzy window for each layer of the semantic grid pyramid.
[0068] The sizes of the preset fuzzy windows corresponding to different layers of the semantic grid pyramid are different.
[0069] Specifically, the target semantic grid map may be the 0th layer of the semantic grid pyramid, which is the highest resolution layer. Preset fuzzy windows of different sizes may be generated for each layer of the semantic grid pyramid, and the higher the number of layers of the semantic grid pyramid, the larger the preset fuzzy window may be.
[0070] S207. For multiple positions of the preset fuzzy window in the target semantic grid map, determine multiple grid values within the current preset fuzzy window, and determine the maximum value of the object semantic type values of each semantic type in the multiple grid values.
[0071] Specifically, each preset fuzzy window can be slid in the target semantic grid map, and the maximum value of the object semantic type value of each semantic type in the multiple grid values in the current preset fuzzy window can be determined for the position of each preset fuzzy window in the target semantic grid map. The object semantic type value can be 1 or 0, 1 indicates that the object semantic type of the current type is true, and 0 indicates that the object semantic type of the current type is false. Each grid value can contain object semantic type values of multiple semantic types.
[0072] S208 . Generate semantic grid maps of various resolutions according to the maximum value to obtain a semantic grid pyramid.
[0073] Specifically, for the maximum value of the object semantic type of each semantic type contained in the grid value in each preset fuzzy window, the current maximum value is determined as the grid value at the corresponding position of the semantic grid map of the corresponding layer of the current preset fuzzy window to obtain a semantic grid pyramid.
[0074] The above three steps generate low-resolution images through a preset fuzzy method based on the high-resolution image target semantic grid map, and generate a semantic grid pyramid according to the resolution sorting. The higher the number of image layers in the pyramid, the lower the resolution.
[0075] Optionally, generating semantic grid maps of multiple resolutions according to the maximum value to obtain a semantic grid pyramid includes: for each of the maximum values, determining the current maximum value as the object semantic type value of the target area in the semantic grid map of the target layer in the semantic grid pyramid to obtain the semantic grid pyramid, wherein the target layer is the number of layers of the semantic grid pyramid associated with the preset fuzzy window corresponding to the current maximum value, and the target area is the area of the preset fuzzy window corresponding to the current maximum value in the target semantic grid map mapped to the area of the semantic grid map of the target layer.
[0076] For example, if the preset fuzzy window of the Nth layer of the semantic grid pyramid can be represented as the set FuzzyWindowN={(u, v)|u, v are integers, and u and v are both greater than or equal to -2N +1 and less than or equal to 2 N -1}, the value of each grid coordinate (x, y) of the semantic grid map in the generated semantic grid pyramid can be:
[0077] Max{HS_0[InputWindowN]}
[0078] Among them, the size of the semantic raster map in the semantic raster pyramid is consistent with the size of the target semantic raster map. HS_0[InputWindowN] in the above formula represents the raster value in the preset fuzzy window InputWindowN of the Nth layer in the target semantic raster map. Max{} indicates that the output raster value is the maximum value of the semantic type value of each semantic type in the raster value output by HS_0[InputWindowN], and "true" is greater than "false" in the semantic type value. InputWindowN can be expressed as: {(x, y)+(u, v)}. The coordinates of the lower left corner of the preset fuzzy window are (x-2 N +1, y-2 N +1), the coordinates of the upper right corner are (x+2 N -1,y+2 N -1). In the semantic grid map of the semantic grid pyramid, each grid value can have multiple true object semantic type values at the same time. Optionally, InputWindowN can also be expressed as {(3x, 3y)+(u, v)}.
[0079] Figure 5 is a schematic diagram of a grid in a preset fuzzy window. Figure 5 As shown, taking the generation of the first-level semantic grid map HS_1 in the semantic grid pyramid as an example, the grid coordinates (x, y) in HS_0 corresponding to the grid values in the generated HS_1 can be:
[0080] Max{HS_0[(x-1,x+1),(y-1,y+1)]}.
[0081] Among them, Figure 5 As shown, the preset blur window of HS_1 includes 9 grids in HS_0. If HS_0 = {{1,0,0,0}, {0,1,0,0}, {0,0,1,0}, {0,0,0,1}, {1,0,0,0}, {0,0,1,0}, {0,1,0,0}, {0,0,1,0}, {0,0,1,0}, {1,0,0,0}}, then Max{Pset} = {1,1,1,1}.
[0082] S209: Perform loop detection using the semantic grid pyramid.
[0083] The loop detection method provided by the embodiment of the present invention accurately maps the historical semantic map and the current semantic map to a third-party coordinate system by using the pose, accurately determines the intersection of the historical semantic map and the current semantic map, and uses the intersection to determine the historical semantic map to be searched (i.e., the target semantic map). Then, by rasterizing the target semantic map and traversing the rasterization to obtain the grids in the grid map, the object semantic type values in the target semantic map are accurately mapped to the grid map to obtain the target semantic grid map containing the object semantic type feature information. Then, by setting different preset fuzzy windows for each layer of the semantic grid pyramid and determining the maximum value of the object semantic type value of each object semantic type contained in the grid value within each preset fuzzy window, a semantic grid pyramid containing a plurality of low-resolution semantic grid maps is quickly generated. Finally, the semantic grid pyramid can be used to accurately perform loop detection.
[0084] Embodiment 3
[0085] Figure 6 FIG. 1 is a schematic diagram of the structure of a loop detection device provided in Embodiment 3 of the present invention. Figure 6 As shown, the device includes: a target map determination module 301, a grid map determination module 302 and a loop detection module 303, wherein:
[0086] A target map determination module, used to obtain a historical semantic map and a current semantic map, determine an intersection of the historical semantic map and the current semantic map, and determine a target semantic map using the intersection;
[0087] A grid map determination module, configured to perform semantic gridding processing on the target semantic map to obtain a target semantic grid map, wherein the target semantic grid map contains semantic type values of objects in the target semantic map;
[0088] The loop detection module is used to generate a semantic grid pyramid of the target semantic grid map according to the semantic type value of the object, and use the semantic grid pyramid to perform loop detection, wherein the semantic grid pyramid contains semantic grid maps of multiple resolutions.
[0089] The loop closure detection device provided in the embodiment of the present invention does not require the addition of additional sensors or other equipment. It uses the historical semantic map and the current semantic map to establish a target semantic map, then uses the grid map of the target semantic map to generate a semantic grid pyramid, and finally uses the image in the semantic grid pyramid to accurately perform loop closure detection. The loop closure detection device is suitable for scenarios with poor signal transmission such as underground and urban canyons, as well as scenarios for loop closure detection of BEV semantic maps.
[0090] Optionally, the loop detection module includes:
[0091] The image pyramid determination unit is used to perform fuzzy processing on the semantic type value of the object in the target semantic grid map by using a preset convolution operation, and generate a semantic grid pyramid by using the result of the fuzzy processing.
[0092] Optionally, the method uses a preset convolution operation to fuzzify the semantic type values of objects in the target semantic grid map, and uses the result of the fuzzification process to generate a semantic grid pyramid, including: generating a preset fuzzy window for each layer of the semantic grid pyramid, wherein the sizes of the preset fuzzy windows corresponding to different layers of the semantic grid pyramid are different; determining multiple grid values within the current preset fuzzy window for multiple positions of the preset fuzzy window in the target semantic grid map, and determining the maximum value of the semantic type value of the object of each semantic type in the multiple grid values; and generating semantic grid maps of multiple resolutions according to the maximum value to obtain a semantic grid pyramid.
[0093] Furthermore, generating semantic grid maps of multiple resolutions according to the maximum value to obtain a semantic grid pyramid includes: for each of the maximum values, determining the current maximum value as the object semantic type value of the target area in the semantic grid map of the target layer in the semantic grid pyramid to obtain the semantic grid pyramid, wherein the target layer is the number of layers of the semantic grid pyramid associated with the preset fuzzy window corresponding to the current maximum value, and the target area is the area of the preset fuzzy window corresponding to the current maximum value in the target semantic grid map mapped to the area of the semantic grid map of the target layer.
[0094] Optionally, the grid map determination module includes:
[0095] A raster map generating unit, configured to rasterize the target semantic map to obtain a raster map, wherein the raster resolution of the raster map is consistent with the resolution of the target semantic map;
[0096] The target grid map determination unit is used to traverse each grid in the grid map and generate a target semantic grid map according to the object semantic type value in the current grid, wherein the object semantic type at least includes the semantic type of the ground feature.
[0097] Optionally, if the object semantic type value is a Boolean type value, each grid of the target semantic grid map includes at most one true Boolean type value.
[0098] Optionally, the target map determination module includes:
[0099] A first mapping unit, configured to map the current semantic map to a world coordinate system in a manner of a first preset search window according to the position and posture of the current semantic map;
[0100] A second mapping unit, configured to map the historical semantic map to the world coordinate system in a second preset search window according to the position and posture of the historical semantic map;
[0101] The target map determining unit is used to determine the target semantic map in the world coordinate system by using the historical semantic map that has an intersection with the current semantic map.
[0102] The loop detection device provided in the embodiment of the present invention can execute the loop detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0103] Embodiment 4
[0104] Figure 7 A schematic diagram of the structure of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as car computers, laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0105] like Figure 7 As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0106] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0107] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 41 performs the various methods and processes described above, such as the loop detection method.
[0108] In some embodiments, the loop detection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the loop detection method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to perform the loop detection method in any other appropriate manner (e.g., by means of firmware).
[0109] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0110] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0111] The computer device provided above can be used to execute the loop detection method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0112] Embodiment 5
[0113] In the context of the present invention, a computer-readable storage medium may be a tangible medium, wherein the computer-executable instructions, when executed by a computer processor, are used to perform a loop detection method, the method comprising:
[0114] Acquire a historical semantic map and a current semantic map, determine an intersection of the historical semantic map and the current semantic map, and use the intersection to determine a target semantic map;
[0115] Performing semantic rasterization processing on the target semantic map to obtain a target semantic raster map, wherein the target semantic raster map contains the semantic type values of the objects in the target semantic map;
[0116] A semantic grid pyramid of the target semantic grid map is generated according to the semantic type value of the object, and loop detection is performed using the semantic grid pyramid, wherein the semantic grid pyramid contains semantic grid maps of multiple resolutions.
[0117] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by an instruction execution system, device or equipment or used with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0118] The computer device provided above can be used to execute the loop detection method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0119] It is worth noting that in the embodiment of the above loop detection device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0120] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A loop detection method, It is characterized in that include: Acquire a historical semantic map and a current semantic map, determine an intersection of the historical semantic map and the current semantic map, and use the intersection to determine a target semantic map; Performing semantic rasterization processing on the target semantic map to obtain a target semantic raster map, wherein the target semantic raster map contains the semantic type values of the objects in the target semantic map; A semantic grid pyramid of the target semantic grid map is generated according to the semantic type value of the object, and loop detection is performed using the semantic grid pyramid, wherein the semantic grid pyramid contains semantic grid maps of multiple resolutions.
2. The method according to claim 1, It is characterized in that The generating of the semantic grid pyramid of the target semantic grid map according to the semantic type value of the object comprises: The semantic type values of the objects in the target semantic grid map are fuzzified using a preset convolution operation, and a semantic grid pyramid is generated using the result of the fuzzification process.
3. The method according to claim 2, It is characterized in that The method of using a preset convolution operation to perform fuzzy processing on the semantic type value of the object in the target semantic grid map, and using the result of the fuzzy processing to generate a semantic grid pyramid includes: For each layer of the semantic grid pyramid, a preset fuzzy window is generated respectively, wherein the sizes of the preset fuzzy windows corresponding to different layers of the semantic grid pyramid are different; For multiple positions of the preset fuzzy window in the target semantic grid map, determining multiple grid values within the current preset fuzzy window, and determining the maximum value of the object semantic type value of each semantic type in the multiple grid values; Semantic grid maps of various resolutions are generated according to the maximum value to obtain a semantic grid pyramid.
4. The method according to claim 3, It is characterized in that Generating semantic grid maps of multiple resolutions according to the maximum value to obtain a semantic grid pyramid includes: For each of the maximum values, the current maximum value is determined as the object semantic type value of the target area in the semantic grid map of the target layer in the semantic grid pyramid to obtain the semantic grid pyramid, wherein the target layer is the number of layers of the semantic grid pyramid associated with the preset fuzzy window corresponding to the current maximum value, and the target area is the area of the preset fuzzy window corresponding to the current maximum value in the target semantic grid map mapped to the area of the semantic grid map of the target layer.
5. The method according to claim 1, It is characterized in that The performing semantic rasterization processing on the target semantic map to obtain the target semantic raster map includes: Rasterizing the target semantic map to obtain a grid map, wherein a grid resolution of the grid map is consistent with a resolution of the target semantic map; Each grid in the grid map is traversed, and a target semantic grid map is generated according to the semantic type value of the object in the current grid, wherein the semantic type of the object at least includes the semantic type of the ground feature.
6. The method according to claim 5, It is characterized in that If the object semantic type value is a Boolean type value, each grid of the target semantic grid map includes at most one true Boolean type value.
7. The method according to claim 1, It is characterized in that The determining the intersection of the historical semantic map and the current semantic map, and using the intersection to determine the target semantic map, includes: According to the position and posture of the current semantic map, mapping the current semantic map to the world coordinate system in a manner of a first preset search window; According to the position and posture of the historical semantic map, mapping the historical semantic map to the world coordinate system in a second preset search window; In the world coordinate system, a target semantic map is determined using a historical semantic map that intersects with the current semantic map.
8. A loop detection device, It is characterized in that include: A target map determination module, used to obtain a historical semantic map and a current semantic map, determine an intersection of the historical semantic map and the current semantic map, and determine a target semantic map using the intersection; A grid map determination module, configured to perform semantic gridding processing on the target semantic map to obtain a target semantic grid map, wherein the target semantic grid map contains semantic type values of objects in the target semantic map; The loop detection module is used to generate a semantic grid pyramid of the target semantic grid map according to the semantic type value of the object, and use the semantic grid pyramid to perform loop detection, wherein the semantic grid pyramid contains semantic grid maps of multiple resolutions.
9. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the loop detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the loop detection method according to any one of claims 1 to 7 when executed.
