CN118297796A - Training method and device for road element extraction model and computer equipment - Google Patents

Training method and device for road element extraction model and computer equipment Download PDF

Info

Publication number
CN118297796A
CN118297796A CN202211728953.0A CN202211728953A CN118297796A CN 118297796 A CN118297796 A CN 118297796A CN 202211728953 A CN202211728953 A CN 202211728953A CN 118297796 A CN118297796 A CN 118297796A
Authority
CN
China
Prior art keywords
sample
tile
splicing
map
road
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211728953.0A
Other languages
Chinese (zh)
Inventor
张子阳
马冰
郑慧琳
吴金英
王邓江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Wanji Iov Technology Co ltd
Original Assignee
Suzhou Wanji Iov Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Wanji Iov Technology Co ltd filed Critical Suzhou Wanji Iov Technology Co ltd
Priority to CN202211728953.0A priority Critical patent/CN118297796A/en
Publication of CN118297796A publication Critical patent/CN118297796A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The application relates to a training method, a training device, a training computer device, a training storage medium and a training computer program product for a road element extraction model. The method comprises the following steps: acquiring a two-dimensional sample map of a sample area under different resolutions; labeling the road elements on the two-dimensional sample map to obtain labeling vector information; dividing and splicing the two-dimensional sample map to obtain a sample tile spliced atlas; converting the labeling vector information to obtain absolute coordinates of corresponding road elements, and converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road elements in the corresponding sample tile mosaic; and training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic set as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels to obtain the trained road element extraction model. The method can train the road element extraction model to realize the efficient manufacturing of the high-precision map.

Description

Training method and device for road element extraction model and computer equipment
Technical Field
The present application relates to the field of high-precision map making technology, and in particular, to a training method, apparatus, computer device, storage medium and computer program product for a road element extraction model.
Background
High-definition maps, also known as high-resolution maps (HD maps, high Definition Map), are used to assist the autopilot system in high-precision positioning, environment awareness, and driving planning decisions during driving, and therefore have centimeter-level high-precision Map data. In the high-precision map, the structured information of roads such as lane line information, traffic sign information, traffic light information and the like is generally stored in the form of vector information, namely an ordered longitude and latitude coordinate list, and the drawing process of the high-precision map is the process of acquiring the road element data vector information.
Since the autopilot system needs to compare the information collected by the sensor with the stored high-precision map to determine the position and direction, the accuracy of the high-precision map is critical for autopilot. The traditional high-precision map is manufactured by a large amount of manpower, so that time and labor are wasted, the calculation process is complex, the manufacturing process is relatively time-consuming due to high precision requirements, and the problem of low manufacturing efficiency of the high-precision map industry exists.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a road element extraction model training method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve the efficiency of high-precision map industry production.
In a first aspect, the present application provides a training method for a road element extraction model. The method comprises the following steps:
acquiring a two-dimensional sample map of a sample area under different resolutions;
Labeling the road elements on the two-dimensional sample map to obtain labeling vector information;
dividing a two-dimensional sample map to obtain a sample tile map set;
the method comprises the steps of splicing sample tile graphs in a sample tile map set to obtain a sample tile spliced graph set;
Converting the labeling vector information to obtain absolute coordinates of corresponding road elements, and converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road elements in the corresponding sample tile mosaic;
And training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic set as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels to obtain the trained road element extraction model.
In one embodiment, a sample tile stitching atlas is obtained by stitching sample tile maps in a sample tile map set, comprising:
acquiring a splicing side length and a splicing step length, wherein the splicing step length is smaller than the splicing side length;
And according to the splicing side length and the splicing step length, splicing the sample tile graphs in the sample tile map set according to rows or columns to obtain a sample tile splicing graph set.
In one embodiment, a sample tile stitching atlas is obtained by stitching sample tile maps in a sample tile map set, comprising:
Acquiring a splicing side length, a splicing step length and a dimension side length of a tile splicing diagram, wherein the splicing side length is larger than the dimension side length, and the splicing step length is smaller than the splicing side length;
according to the splicing side length and the splicing step length, splicing the sample tile graphs in the sample tile map set according to rows or columns to obtain a tile splicing augmentation chart set;
And performing rotary cutting on the tile splicing augmentation graphs in the tile splicing augmentation graphs for multiple times according to the size side length to obtain a sample tile splicing graph set.
In one embodiment, converting the labeling vector information to obtain absolute coordinates of the corresponding road element includes:
sinLatitude=sin(latitude×π/180);
absX=((longitude+180)/360)×256×2level
absY=(0.5-log((1+sinLatitude)/(1-sinLatitude))/4π)×256×2level
Wherein latitude and longitude are latitude and longitude coordinates, respectively, of the road element in the geographic coordinate system; level is the level of the sample tile map; absX and absY are the abscissa and ordinate, respectively, of the road element in the absolute coordinate system of the pixel.
In one embodiment, converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road element in the corresponding sample tile mosaic includes:
determining absolute coordinates of pixels at the upper left corner in a sample tile mosaic corresponding to each road element;
and determining the pixel relative coordinates of the road element in the corresponding sample tile mosaic according to the difference between the absolute coordinates of the road element and the absolute coordinates of the upper left corner pixel.
In one embodiment, the training method of the road element extraction model further includes:
Acquiring two-dimensional maps of target areas under different resolutions;
Dividing the two-dimensional map to obtain a tile map set;
the tile splicing chart set is obtained by splicing the tile charts in the tile chart set;
Inputting the tile mosaic in the tile mosaic set to the trained road element extraction model, and outputting the pixel relative coordinates of the road elements in the corresponding tile mosaic;
And converting the relative coordinates of pixels of the road elements in the corresponding tile mosaic to obtain the vector information of the road elements in the target area.
In one embodiment, the road element includes at least one of a lane line or a road pavement marking.
In a second aspect, the application further provides a training device of the road element extraction model. The device comprises:
the sample acquisition module is used for acquiring a two-dimensional sample map of the sample area under different resolutions;
the sample labeling module is used for labeling road elements on the two-dimensional sample map to obtain labeling vector information;
the map segmentation module is used for segmenting the two-dimensional sample map to obtain a sample tile map set;
The tile splicing module is used for splicing the sample tile graphs in the sample tile map set to obtain a sample tile splicing graph set;
The coordinate conversion module is used for converting the labeling vector information to obtain absolute coordinates of the corresponding road elements, and converting the absolute coordinates to obtain the relative coordinates of the pixels of the corresponding road elements in the corresponding sample tile mosaic;
the model training module is used for training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels, so as to obtain the trained road element extraction model.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
acquiring a two-dimensional sample map of a sample area under different resolutions;
Labeling the road elements on the two-dimensional sample map to obtain labeling vector information;
dividing a two-dimensional sample map to obtain a sample tile map set;
the method comprises the steps of splicing sample tile graphs in a sample tile map set to obtain a sample tile spliced graph set;
Converting the labeling vector information to obtain absolute coordinates of corresponding road elements, and converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road elements in the corresponding sample tile mosaic;
And training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic set as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels to obtain the trained road element extraction model.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring a two-dimensional sample map of a sample area under different resolutions;
Labeling the road elements on the two-dimensional sample map to obtain labeling vector information;
dividing a two-dimensional sample map to obtain a sample tile map set;
the method comprises the steps of splicing sample tile graphs in a sample tile map set to obtain a sample tile spliced graph set;
Converting the labeling vector information to obtain absolute coordinates of corresponding road elements, and converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road elements in the corresponding sample tile mosaic;
And training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic set as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels to obtain the trained road element extraction model.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
acquiring a two-dimensional sample map of a sample area under different resolutions;
Labeling the road elements on the two-dimensional sample map to obtain labeling vector information;
dividing a two-dimensional sample map to obtain a sample tile map set;
the method comprises the steps of splicing sample tile graphs in a sample tile map set to obtain a sample tile spliced graph set;
Converting the labeling vector information to obtain absolute coordinates of corresponding road elements, and converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road elements in the corresponding sample tile mosaic;
And training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic set as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels to obtain the trained road element extraction model.
The training method, the training device, the training computer equipment, the training storage medium and the training computer program product of the road element extraction model acquire two-dimensional sample maps of sample areas under different resolutions; labeling the road elements on the two-dimensional sample map to obtain labeling vector information; dividing a two-dimensional sample map to obtain a sample tile map set; the method comprises the steps of splicing sample tile graphs in a sample tile map set to obtain a sample tile spliced graph set; converting the labeling vector information to obtain absolute coordinates of corresponding road elements, and converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road elements in the corresponding sample tile mosaic; and training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic set as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels to obtain the trained road element extraction model. And in the whole road element extraction model training process, vector information labeling and segmentation are carried out on the obtained two-dimensional sample map, and a sample tile map set labeled with vector information is obtained. And splicing the sample tile graphs in the sample tile map set, carrying out coordinate conversion on the labeled vector information to obtain the pixel relative coordinates of the corresponding road elements in the corresponding sample tile spliced graph, taking the sample tile spliced graph as a training sample, taking the pixel relative coordinates of the road elements as a training label, and training the road element extraction model, thereby realizing the efficient internal industry production of the high-precision map.
Drawings
FIG. 1 is an application environment diagram of a training method of a road element extraction model in one embodiment;
FIG. 2 is a flow chart of a training method of a road element extraction model in one embodiment;
FIG. 3 is a flow diagram of obtaining a sample tile stitching atlas in one embodiment;
FIG. 4 is a flow chart of obtaining relative coordinates of road element pixels in one embodiment;
FIG. 5 is a flowchart of a training method of a road element extraction model according to another embodiment;
FIG. 6 is a block diagram of a training device for a road element extraction model in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The training method of the road element extraction model provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The user operates on the terminal 102 side, and the terminal 102 trains the road element extraction model in response to the user operation.
Specifically, the terminal 102 acquires a two-dimensional sample map of the sample area at different resolutions; labeling the road elements on the two-dimensional sample map to obtain labeling vector information; dividing a two-dimensional sample map to obtain a sample tile map set; the method comprises the steps of splicing sample tile graphs in a sample tile map set to obtain a sample tile spliced graph set; converting the labeling vector information to obtain absolute coordinates of corresponding road elements, and converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road elements in the corresponding sample tile mosaic; and training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic set as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels to obtain the trained road element extraction model. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, portable wearable devices, and the internet of things devices may be intelligent vehicle devices and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, a training method of a road element extraction model is provided, and the method is applied to the terminal 102 in fig. 1 for illustration, and includes the following steps:
S100: a two-dimensional sample map of the sample area at different resolutions is acquired.
The first step in training the road element extraction model is to perform in-field data acquisition to obtain all the information of the road in the sample area. Firstly, images with high positioning accuracy in different resolutions of a sample area are acquired through a map acquisition vehicle. Vehicles used to collect map data are typically equipped with sensor packages including high precision integrated navigation, high beam lidar, high pixel perception cameras, through which two-dimensional maps of sample area roads at different levels can be acquired. In this embodiment, the obtained two-dimensional map includes the two-dimensional map of the sample area road at the 23-level resolution.
S200: and marking the road elements on the two-dimensional sample map to obtain marking vector information.
And (3) marking the manual vector information on the two-dimensional sample map of the collected sample area road under the 23-level resolution. Labeling personnel refers to visual labeling data on a customized labeling tool, labels longitude and latitude of vector information elements required by a high-precision map such as lane lines, stop lines, crosswalks, pavement marks and the like, and is used for establishing a training data set to train a deep learning model for extracting road elements.
S300: and dividing the two-dimensional sample map to obtain a sample tile map set.
The method for extracting road elements on the two-dimensional sample map by using the deep learning technology is a method for improving the drawing efficiency of the high-precision map. But the deep learning model has certain requirements on the size of the processed image. The resolution of the image is too large, and the limitation of computing resources can be broken through; the resolution is too small and the road elements on the map cannot be displayed completely. Therefore, the two-dimensional sample map needs to be segmented and spliced, and the image size is converted into a size suitable for being input into a model, so that the two-dimensional sample map can be used for training and reasoning of the deep learning model.
Based on the tile pyramid model, a two-dimensional sample map at different resolutions may be partitioned into many small map units, each of which is referred to as a map tile. Each map tile has a unique tile map level (level) and tile coordinate number (tileX,), with each tile divided typically being 256 x 256 pixels in size. From the top layer to the bottom layer of the tile pyramid, the length and width pixel values of the next layer are twice that of the previous layer, the map resolution is higher and higher, but the geographical range represented is unchanged, that is, the higher the tile map level is, the more tiles form the map, and the physical size and detail representation of the display map are correspondingly increased. In the tile pyramid model, if the two-dimensional map at the 0 th resolution is represented by a 256×256 pixel picture, the two-dimensional map at the 23 rd resolution is (256×2 23)×(256×223), and each pixel corresponds to a geographic area of about 1.4 square centimeters in the middle-low latitude region. The position and shape of the road lane line, the ground mark and other elements can be clearly displayed under the resolution.
In this embodiment, a two-dimensional map of the road of the sample area at a resolution of 23 is divided into a small block of sample map tiles, each sample tile having a resolution of 256×256, representing a geographic area of about 3.6x3.6 square meters, with each sample tile having a unique coordinate number (tileX, tileY). After the two-dimensional map of the sample area road at the resolution of 23 is divided, a sample tile map set composed of sample tile maps with the resolution of 256×256 is obtained.
S400: and splicing the sample tile graphs in the sample tile map set to obtain a sample tile spliced graph set.
Since the resolution of the segmented single sample tile map is too small to display road elements on the map completely, it is necessary to splice the segmented sample tile map. Taking a 23-level sample tile map as an example, the resolution of each sample tile map is 256×256, which represents a geographic area of about 3.6x3.6 square meters, and if the size side of the sample tile map is 5 tiles, the resolution of each spliced sample tile map is 1280×1280, which represents a geographic area of about 18×18 meters, which is suitable for model input. And splicing the single sample tile graphs in the sample tile map set, namely splicing the sample tile graphs with the resolution of 256 multiplied by 256 into sample tile spliced graphs with the resolution of 1280 multiplied by 1280, and obtaining a sample tile spliced graph set formed by the sample tile spliced graphs with the size and side length of 5 tiles.
S500: and converting the labeling vector information to obtain absolute coordinates of the corresponding road elements, and converting the absolute coordinates to obtain the pixel relative coordinates of the corresponding road elements in the corresponding sample tile mosaic.
After the sample tile map is spliced, vector information marked on the two-dimensional sample map is required to be converted into pixel coordinate information on the sample tile spliced map. Firstly, converting longitude and latitude coordinates marked on a two-dimensional sample map to obtain pixel absolute coordinates of corresponding road elements, and converting the pixel absolute coordinates to obtain pixel relative coordinates of the corresponding road elements in a corresponding sample tile mosaic.
Take a tile mosaic with a resolution of 1280 x 1280 as an example. Firstly, converting longitude and latitude coordinates in vector information into pixel absolute coordinates in a pixel coordinate system, and projecting the longitude and latitude coordinates in a geographic coordinate system onto a two-dimensional plane according to a mercator projection formula. The projection formula is:
sinLatitude=sin(latitude×π/180);
absX=((longitude+180)/360)×256×2level
absY=(0.5-log((1+sinLatitude)/(1-sinLatitude))/4π)×256×2level
wherein latitude and longitude are latitude and longitude coordinates, respectively, of the road element in the geographic coordinate system; level is the level of the sample tile map, in this embodiment, level=23; absX and absY are the pixel absolute abscissa and the pixel absolute ordinate of the road element in the pixel coordinate system, respectively.
After obtaining the absolute pixel coordinates (absX 1, absY 1) of a point on the corresponding road element, it is necessary to determine whether the coordinate position is within the geographic range represented by the sample tile mosaic with the resolution of 1280×1280. Therefore, according to the sample tile map coordinate number (tx, ty) of the leftmost upper corner of the sample tile map, further calculating the pixel absolute coordinates (absX, absY) of the leftmost upper corner of the sample tile map, wherein the specific calculation formula is as follows: absX2 =256×tx, absY =256×ty. By subtracting the absolute coordinates of the pixels of the points (absX, absY 1) and (absX, absY) to obtain the relative coordinates (refX, refY 1) of the longitude and latitude in the sample tile mosaic, wherein refX 1= absX1-absX2 and refY 1= absY1-absY2 can be obtained. By determining whether the pixel relative coordinates (refX, refY 1) of the point are within the range of [0, 1280] × [0, 1280], it is determined whether the point falls within the geographic range represented by the sample tile mosaic. And traversing the longitude and latitude coordinates of all vector information to obtain the pixel relative coordinates of all road elements in the corresponding sample tile mosaic.
S600: and training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic set as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels to obtain the trained road element extraction model.
And establishing a training data set according to the sample tile mosaic in the sample tile mosaic set and the relative coordinates of pixels of corresponding road elements in the corresponding sample tile mosaic. And taking each sample tile mosaic as a training sample, taking the relative coordinates of pixels of road elements in the corresponding sample tile mosaic as training labels, and training a road element extraction model constructed based on a deep learning technology to obtain a trained road element extraction model.
According to the training method of the road element extraction model, two-dimensional sample maps of sample areas under different resolutions are obtained; labeling the road elements on the two-dimensional sample map to obtain labeling vector information; dividing a two-dimensional sample map to obtain a sample tile map set; the method comprises the steps of splicing sample tile graphs in a sample tile map set to obtain a sample tile spliced graph set; converting the labeling vector information to obtain absolute coordinates of corresponding road elements, and converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road elements in the corresponding sample tile mosaic; and training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic set as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels to obtain the trained road element extraction model. And in the whole road element extraction model training process, vector information labeling and segmentation are carried out on the obtained two-dimensional sample map, and a sample tile map set labeled with vector information is obtained. And splicing the sample tile graphs in the sample tile map set, carrying out coordinate conversion on the labeled vector information to obtain the pixel relative coordinates of the corresponding road elements in the corresponding sample tile spliced graph, taking the sample tile spliced graph as a training sample, taking the pixel relative coordinates of the road elements as a training label, and training the road element extraction model, thereby realizing the efficient internal industry production of the high-precision map.
In one embodiment, a sample tile stitching atlas is obtained by stitching sample tile maps in a sample tile map set, comprising:
acquiring a splicing side length and a splicing step length, wherein the splicing step length is smaller than the splicing side length;
And according to the splicing side length and the splicing step length, splicing the sample tile graphs in the sample tile map set according to rows or columns to obtain a sample tile splicing graph set.
After the two-dimensional sample map is divided into a small sample tile map, the resolution of the divided sample tile map is too small to display map elements completely, so that further splicing of the divided sample tile map is required. Taking a 23-level sample tile map as an example, each sample tile map has a resolution of 256×256, and each sample tile map has a unique coordinate number (tileX, tileY). In order to increase the data volume of the road element extraction model training set and ensure that the road elements on the two-dimensional sample map can be completely extracted, the splicing step length is set to be smaller than the splicing side length so as to carry out overlapped splicing. For example, when the splice side length is 7 tiles, the splice step length may be set to 2 tiles.
When the tiles are spliced, the tiles can be spliced by rows or columns, taking the splicing step length of 2 tiles and the row splicing as an example, if the coordinate number of the upper left corner tile of the first sample tile splicing diagram is (tx, ty), the coordinate number of the upper left corner tile of the next sample tile splicing diagram is (tx+2, ty), the coordinate numbers of the upper left corner tiles of all the sample tile splicing diagrams in the first row are (tx, ty), (tx+2, ty), (tx+4, ty), and the like. And after the tile map of the row is spliced, the tile map of the next row is spliced, and the upper left corner tile coordinate numbers of all sample tile spliced maps of the next row are as follows: (tx, ty+2), (tx+2, ty+2), (tx+4, ty+2), …. And deleting the sample tile mosaic map with smaller effective identification area after all the tile maps are spliced in the mode, so as to obtain a sample tile mosaic map set.
In this embodiment, the split single sample tile graphs are spliced, and the splicing step length is set to be smaller than the splicing side length, so that the splicing is overlapped, thereby increasing the data volume of the training set of the road element extraction model, enabling the road elements on the two-dimensional sample map to be completely extracted, effectively improving the training effect of the road element extraction model and realizing the efficient manufacturing of the high-precision map by preprocessing the training set data.
In one embodiment, as shown in fig. 3, by stitching sample tile maps in a sample tile map set, a sample tile stitching map set is obtained, comprising:
s420: acquiring a splicing side length, a splicing step length and a dimension side length of a tile splicing diagram, wherein the splicing side length is larger than the dimension side length, and the splicing step length is smaller than the splicing side length;
s440: according to the splicing side length and the splicing step length, splicing the sample tile graphs in the sample tile map set according to rows or columns to obtain a tile splicing augmentation chart set;
S460: and performing rotary cutting on the tile splicing augmentation graphs in the tile splicing augmentation graphs for multiple times according to the size side length to obtain a sample tile splicing graph set.
In the field production process of the high-precision map, data acquisition is often carried out on roads within the range of several square kilometers at one time, so that the acquired roads are often distributed at two mutually perpendicular angles, and the acquired road angle distribution is extremely unbalanced, and therefore, the rotation and the amplification of the sample tile spliced map are required to improve the robustness and the generalization capability of the road element extraction model.
To obtain a sample tile mosaic of size side 5 tiles, with a resolution of 1280 x 1280, a larger tile map may be first stitched and then non-destructive rotational cropping based on the larger tile map. Specifically, a tile map with a splicing side length of 7 tiles and a splicing step length of 2 tiles can be set, a plurality of tile maps with a 7-tile width of 7 tiles, a 7-tile height and a resolution of 1792×1792 can be obtained, and corresponding labels can be extracted. And then rotating the labels of the spliced tile images by a random angle, and finally cutting the images and the labels in the range of 1280 multiplied by 1280 pixels of the center area of the rotated image to obtain a lossless 1280 multiplied by 1280 rotary tile image and a corresponding label.
In the embodiment, data augmentation and lossless rotation clipping are performed based on the sample tile map and the label, so that the data volume of a training set is increased, the robustness and generalization capability of the road element extraction model are improved, the training effect of the road element extraction model is improved, and the efficient manufacturing of the high-precision map is realized.
In one embodiment, converting the labeling vector information to obtain absolute coordinates of the corresponding road element includes:
sinLatitude=sin(latitude×π/180);
absX=((longitude+180)/360)×256×2level
absY=(0.5-log((1+sinLatitude)/(1-sinLatitude))/4π)×256×2level
Wherein latitude and longitude are latitude and longitude coordinates, respectively, of the road element in the geographic coordinate system; level is the level of the sample tile map; absX and absY are the abscissa and ordinate, respectively, of the road element in the absolute coordinate system of the pixel.
After the sample tile map is spliced, vector information marked on the two-dimensional sample map is required to be converted into pixel coordinate information on the sample tile spliced map. Taking a tile mosaic with a resolution of 1280×1280 as an example, firstly, according to the above-mentioned mercator projection formula, longitude and latitude coordinates (longitude, latitude) in vector information are converted into pixel absolute coordinates (absX, absY) in a pixel coordinate system. In this embodiment, for a two-dimensional map at 23-level resolution, level=23 is substituted into the projection formula.
In this embodiment, the vector information marked on the two-dimensional sample map is converted to obtain the pixel coordinate information on the sample tile mosaic, so that the training of the road element extraction model is performed later, and the training effect of the road element extraction model is effectively improved by preprocessing the training set data, so that the efficient manufacturing of the high-precision map is realized.
In one embodiment, as shown in fig. 4, converting the absolute coordinates to obtain the pixel relative coordinates of the corresponding road element in the corresponding sample tile mosaic, including:
S520: determining absolute coordinates of pixels at the upper left corner in a sample tile mosaic corresponding to each road element;
S540: and determining the pixel relative coordinates of the road element in the corresponding sample tile mosaic according to the difference between the absolute coordinates of the road element and the absolute coordinates of the upper left corner pixel.
After obtaining the absolute pixel coordinates (absX, absY 1) of a point on the corresponding road element according to the mercator projection formula, it is necessary to determine whether the coordinate position is within the geographic range represented by the sample tile mosaic with 1280×1280 resolution. And further calculating the pixel absolute coordinates (absX, absY) of the leftmost corner of the sample tile mosaic according to the sample tile mosaic coordinate numbers (tx, ty) of the leftmost corner of the sample tile mosaic. The specific calculation formula is as follows: absX2 =256×tx, absY =256×ty. By subtracting the absolute coordinates of the pixels of the points (absX, absY 1) and (absX, absY) to obtain the relative coordinates (refX, refY 1) of the longitude and latitude in the sample tile mosaic, wherein refX 1= absX1-absX2 and refY 1= absY1-absY2 can be obtained. By determining whether the pixel relative coordinates (refX, refY 1) of the point are within the range of [0, 1280] × [0, 1280], it is determined whether the point falls within the geographic range represented by the sample tile mosaic. And traversing the longitude and latitude coordinates of all vector information to obtain the pixel relative coordinates of all road elements in the corresponding sample tile mosaic.
In this embodiment, after obtaining the absolute coordinate of a certain point on the corresponding road element, the relative coordinate of the road element in the corresponding sample tile mosaic is obtained through a formula, and the pixel relative coordinates of all the road elements in the corresponding sample tile mosaic are obtained through traversing all the vector information longitude and latitude coordinates, so that the pixel relative coordinates of the road element in the sample tile mosaic are used as training labels for training the road element extraction model, thereby realizing efficient industry production of a high-precision map.
In one embodiment, the training method of the road element extraction model further includes:
Acquiring two-dimensional maps of target areas under different resolutions;
Dividing the two-dimensional map to obtain a tile map set;
the tile splicing chart set is obtained by splicing the tile charts in the tile chart set;
Inputting the tile mosaic in the tile mosaic set to the trained road element extraction model, and outputting the pixel relative coordinates of the road elements in the corresponding tile mosaic;
And converting the relative coordinates of pixels of the road elements in the corresponding tile mosaic to obtain the vector information of the road elements in the target area.
After training of the road element extraction model is completed, vector information of the road elements in the target area is obtained based on the trained road element extraction model. Firstly, the map acquisition vehicle acquires images with high positioning accuracy of a target area to form two-dimensional maps with different grades. The two-dimensional map at different resolutions is then partitioned into a number of small map tiles based on a tile pyramid model, each map tile having a unique tile map level (level) and tile coordinate number (tileX, tileY), each map tile being 256 x 256 pixels in size. After the two-dimensional map is segmented, a tile map set formed by map tiles with the resolution of 256 multiplied by 256 is obtained, then tile maps in the tile map set are spliced to obtain a tile splicing map set, and taking a 23-level map tile map as an example, a splicing side length of 5 tiles and a splicing step length of 2 tiles can be specifically set for overlapping splicing. Assuming that the upper left corner tile of the first tile stitch map has the coordinate number (tx, ty), the tile stitch map required for this tile stitch map and the relative positions between the tile stitch maps are shown in table 1 below:
table 1 tile map numbering for each tile map in tile splice map
(tx,ty) (tx+1,ty) (tx+2,ty) (tx+3,ty) (tx+4,ty)
(tx,ty+1) (tx+1,ty+1) (tx+2,ty+1) (tx+3,ty+1) (tx+4,ty+1)
(tx,ty+2) (yx+1,ty+2) (tx+2,ty+2) (tx+3,ty+2) (tx+4,ty+2)
(tx,ty+3) (tx+1,ty+3) (tx+2,ty+3) (tx+3,ty+3) (tx+4,ty+3)
(tx,ty+4) (tx+1,ty+4) (tx+2,ty+4) (tx+3,ty+4) (tx+4,ty+4)
When the tiles are spliced, because the splicing step length is set to be 2 tiles, the upper left corner tile coordinate number of the first tile splicing diagram is (tx, ty), the upper left corner tile coordinate number of the next tile splicing diagram is (tx+2, ty), the upper left corner tile coordinate number of the next tile splicing diagram is (tx+4, ty), and so on. After the tile map of the row is spliced, the tile map of the next row is spliced, and the coordinate numbers of the upper left corner tiles of the tile map of the next row are as follows: (tx, ty+2), (tx+2, ty+2), (tx+4, ty+2), …. Because the tile splicing graphs are overlapped, the condition that road elements such as lane lines or pavement marks are missed or can not be spliced in a tile graph can be avoided to a great extent. After the overall stitching is completed, a tile stitching atlas is obtained, wherein each tile stitching atlas has a resolution of 1280 x 1280, representing a geographic area of approximately 18 x 18 meters, suitable for model input.
Inputting all the tile splice graphs in the tile splice graph set into a trained road element extraction model to obtain the pixel relative coordinates of the road elements in each tile splice graph. According to the formula: absX =256×tx+ refX, absY =256×ty+ refY, converting the pixel relative coordinates (refX, refY) of the road elements in each tile mosaic into pixel absolute coordinates (absX, absY), then fusing and splicing the road elements in the tile mosaic to obtain the pixel absolute coordinates of the fused road elements, and finally converting the pixel absolute coordinates of the road elements into longitude and latitude coordinates to obtain the vector information of the road elements in the target area.
In this embodiment, a two-dimensional map of a target area is segmented and spliced, a tile mosaic with proper resolution is obtained, the tile mosaic is input to a trained road element extraction model, pixel relative coordinates of road elements in each tile mosaic are obtained, road elements in different tile mosaic are fused based on the pixel relative coordinates, pixel absolute coordinates of the road elements in the two-dimensional map are obtained, the pixel absolute coordinates are converted, finally vector information of lane lines in the two-dimensional map is obtained, and the road element vector information is automatically extracted according to the trained road element extraction model, so that efficient internal industry production of a high-precision map is realized.
In one embodiment, the road element includes at least one of a lane line or a road pavement marking.
High-definition maps currently have OpenDRIVE and NDS as the most popular common format specifications. The OpenDRIVE describes the Road structure mainly through Road elements such as a Road reference line (REFERENCE LINE), a lane (Lanes), a lane segment (Section), objects (Objects), traffic signs (Road signs), elevation (Elevation), intersections (Junction), and the like, and acquires static data within a target area range according to the Road elements and stores the static data in an XML format file form, so that the automatic driving system is assisted to perform functions such as high-precision positioning, environment sensing, planning, decision making, and the like.
In the embodiment, the road elements to be extracted are determined according to the general format specification, so that the corresponding road element extraction model is trained to automatically extract the road element vector information, and the efficient manufacturing of the high-precision map is realized.
In order to describe the technical solution of the lane line vector information acquiring method of the present application in detail, a specific application example will be adopted in the following, and the whole processing procedure will be described in detail with reference to fig. 5, which specifically includes the following steps:
1. the two-dimensional sample map of the sample area under different resolutions is obtained through the map collecting vehicle, the two-dimensional sample map under different resolutions comprises the two-dimensional map of the road of the sample area under 23-level resolution, and the positions and the shapes of road elements such as lane lines, road marks and the like can be clearly displayed under the resolution.
2. And carrying out artificial vector information labeling on the obtained two-dimensional sample map, specifically labeling longitude and latitude of vector information elements required by a high-precision map such as lane lines, stop lines, crosswalk, pavement marks and the like, and establishing a training data set to train a deep learning model for extracting road elements.
3. And dividing the two-dimensional sample map to obtain a sample tile map set. Each tile in the sample tile map set has a resolution of 256 x 256, representing a geographic area of approximately 3.6x3.6 square meters, with each sample tile having a unique coordinate number (tileX, tileY).
4. And splicing the sample tile graphs in the sample tile map set to obtain a sample tile spliced graph set. Taking a 23-level sample tile graph as an example, the method specifically comprises the following steps:
a) Setting the splicing step length smaller than the splicing side length so as to splice with overlap. For example, when the splicing side length is 7 tiles, the splicing step length can be set to be 2 tiles, row-by-row splicing or column-by-column splicing can be selected during splicing, and after all the tile graphs are spliced, the sample tile graph with the smaller effective identification area is deleted.
B) And setting the dimension side length smaller than the splicing side length so as to perform lossless rotary cutting on the spliced tile graph. For example, in order to obtain a sample tile mosaic image with a size of 5 tiles and a resolution of 1280×1280, a tile mosaic image with a size of 7 tiles and a resolution of 1792×1792 may be obtained first, and then rotation amplification may be performed on the basis of the obtained tile mosaic image. Specifically, a tile map with a splicing side length of 7 tiles and a splicing step length of 2 tiles can be set, a plurality of tile maps with a 7-tile width of 7 tiles, a 7-tile height and a resolution of 1792×1792 can be obtained, and corresponding labels can be extracted. And then rotating the labels of the spliced tile images by a random angle, and finally cutting the images and the labels in the range of 1280 multiplied by 1280 pixels of the center area of the rotated image to obtain the lossless rotated tile images and the corresponding labels.
5. And converting the labeling vector information to obtain absolute coordinates of the road elements, and converting the absolute coordinates to obtain the pixel relative coordinates of the road elements in the corresponding sample tile mosaic. Taking a tile mosaic with a resolution of 1280×1280 as an example, the method specifically includes:
a) And converting longitude and latitude coordinates in the vector information into pixel absolute coordinates in a pixel coordinate system according to the mercator projection formula. The projection formula is:
sinLatitude=sin(latitude×π/180);
absX=((longitude+180)/360)×256×2level
absY=(0.5-log((1+sinLatitude)/(1-sinLatitude))/4π)×256×2level
Wherein latitude and longitude are latitude and longitude coordinates, respectively, of the road element in the geographic coordinate system; level is the level of the sample tile map; absX and absY are the pixel absolute abscissa and the pixel absolute ordinate of the road element in the pixel coordinate system, respectively.
B) After obtaining the absolute pixel coordinates (absX, absY 1) of a certain point on the corresponding road element according to the mercator projection formula, further calculating the absolute pixel coordinates (absX, absY) of the leftmost corner of the sample tile mosaic according to the sample tile mosaic coordinate numbers (tx, ty) of the leftmost corner of the sample tile mosaic. The specific calculation formula is as follows: absX2 =256×tx, absY =256×ty. By subtracting the absolute coordinates of the pixels of the two points (absX, absY 1) and (absX, absY), the relative coordinates (refX, refY 1) of the longitude and latitude in the sample tile mosaic can be obtained. Wherein refX 1= absX1-absX2, refY 1= absY1-absY2. By determining whether the pixel relative coordinates (refX, refY 1) of the point are within the range of [0, 1280] × [0, 1280], it is determined whether the point falls within the geographic range represented by the sample tile mosaic. And traversing the longitude and latitude coordinates of all vector information to obtain the pixel relative coordinates of all road elements in the corresponding sample tile mosaic.
6. And training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic set as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels to obtain the trained road element extraction model.
7. After training of the road element extraction model is completed, vector information of the road elements in the target area is obtained based on the trained road element extraction model. Firstly, two-dimensional maps of target areas under different resolutions are obtained, and then the two-dimensional maps are segmented and spliced to obtain a tile spliced atlas. Inputting the tile mosaic in the tile mosaic set to the trained road element extraction model, outputting the pixel relative coordinates of the road elements in the corresponding tile mosaic, and finally converting the pixel relative coordinates of the road elements in the corresponding tile mosaic to obtain the vector information of the road elements in the target area.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, as shown in fig. 6, the embodiment of the application further provides a road element extraction model training device for implementing the above-mentioned training method of the road element extraction model. The device comprises:
The sample acquiring module 601 is configured to acquire a two-dimensional sample map of a sample area under different resolutions;
The sample labeling module 602 is configured to label road elements on the two-dimensional sample map to obtain labeling vector information;
The map segmentation module 603 is configured to segment the two-dimensional sample map to obtain a sample tile map set;
A tile stitching module 604, configured to obtain a sample tile stitching atlas by stitching sample tile graphs in the sample tile map set;
The coordinate conversion module 605 is configured to convert the labeling vector information to obtain an absolute coordinate of a corresponding road element, and convert the absolute coordinate to obtain a pixel relative coordinate of the corresponding road element in the corresponding sample tile mosaic;
The model training module 606 is configured to train the road element extraction model by using the sample tile mosaic in the sample tile mosaic set as a training sample and using the pixel relative coordinates of the road elements in the sample tile mosaic as training labels, so as to obtain a trained road element extraction model.
The training device of the road element extraction model acquires two-dimensional sample maps of sample areas under different resolutions; labeling the road elements on the two-dimensional sample map to obtain labeling vector information; dividing a two-dimensional sample map to obtain a sample tile map set; the method comprises the steps of splicing sample tile graphs in a sample tile map set to obtain a sample tile spliced graph set; converting the labeling vector information to obtain absolute coordinates of corresponding road elements, and converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road elements in the corresponding sample tile mosaic; and training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic set as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels to obtain the trained road element extraction model. And in the whole road element extraction model training process, vector information labeling and segmentation are carried out on the obtained two-dimensional sample map, and a sample tile map set labeled with vector information is obtained. And splicing the sample tile graphs in the sample tile map set, carrying out coordinate conversion on the labeled vector information to obtain the pixel relative coordinates of the corresponding road elements in the corresponding sample tile spliced graph, taking the sample tile spliced graph as a training sample, taking the pixel relative coordinates of the road elements as a training label, and training the road element extraction model, thereby realizing the efficient internal industry production of the high-precision map.
In one embodiment, the tile stitching module 604 is further configured to obtain a stitching edge length and a stitching step length, where the stitching step length is less than the stitching edge length; and according to the splicing side length and the splicing step length, splicing the sample tile graphs in the sample tile map set according to rows or columns to obtain a sample tile splicing graph set.
In one embodiment, the tile stitching module 604 is further configured to obtain a stitching side length, a stitching step length, and a dimension side length of the tile stitching graph, where the stitching side length is greater than the dimension side length, and the stitching step length is less than the stitching side length; according to the splicing side length and the splicing step length, splicing the sample tile graphs in the sample tile map set according to rows or columns to obtain a tile splicing augmentation chart set; and performing rotary cutting on the tile splicing augmentation graphs in the tile splicing augmentation graphs for multiple times according to the size side length to obtain a sample tile splicing graph set.
In one embodiment, the coordinate conversion module 605 is further configured to convert the labeling vector information according to a projection formula, so as to obtain absolute coordinates of the corresponding road element, where the projection formula is:
sinLatitude=sin(latitude×π/180);
absX=((longitude+180)/360)×256×2level
absY=(0.5-log((1+sinLatitude)/(1-sinLatitude))/4π)×256×2level
Wherein latitude and longitude are latitude and longitude coordinates, respectively, of the road element in the geographic coordinate system; level is the level of the sample tile map; absX and absY are the abscissa and ordinate, respectively, of the road element in the absolute coordinate system of the pixel.
In one embodiment, the coordinate conversion module 605 is further configured to determine, for each road element, an absolute coordinate of an upper left corner pixel in the sample tile mosaic corresponding to the road element; and determining the pixel relative coordinates of the road element in the corresponding sample tile mosaic according to the difference between the absolute coordinates of the road element and the absolute coordinates of the upper left corner pixel.
In one embodiment, the model training module 606 is further configured to obtain two-dimensional maps of the target area at different resolutions; dividing the two-dimensional map to obtain a tile map set; the tile splicing chart set is obtained by splicing the tile charts in the tile chart set; inputting the tile mosaic in the tile mosaic set to the trained road element extraction model, and outputting the pixel relative coordinates of the road elements in the corresponding tile mosaic; and converting the relative coordinates of pixels of the road elements in the corresponding tile mosaic to obtain the vector information of the road elements in the target area.
In one embodiment, the model training module 606 is further configured to train a road element extraction model, the road element extracted by the road element extraction model including at least one of a lane line or a road pavement marker.
The respective modules in the training device of the road element extraction model can be fully or partially realized by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a training method of a road element extraction model. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 7 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
acquiring a two-dimensional sample map of a sample area under different resolutions;
Labeling the road elements on the two-dimensional sample map to obtain labeling vector information;
dividing a two-dimensional sample map to obtain a sample tile map set;
the method comprises the steps of splicing sample tile graphs in a sample tile map set to obtain a sample tile spliced graph set;
Converting the labeling vector information to obtain absolute coordinates of corresponding road elements, and converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road elements in the corresponding sample tile mosaic;
And training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic set as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels to obtain the trained road element extraction model.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a splicing side length and a splicing step length, wherein the splicing step length is smaller than the splicing side length; and according to the splicing side length and the splicing step length, splicing the sample tile graphs in the sample tile map set according to rows or columns to obtain a sample tile splicing graph set.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a splicing side length, a splicing step length and a dimension side length of a tile splicing diagram, wherein the splicing side length is larger than the dimension side length, and the splicing step length is smaller than the splicing side length; according to the splicing side length and the splicing step length, splicing the sample tile graphs in the sample tile map set according to rows or columns to obtain a tile splicing augmentation chart set; and performing rotary cutting on the tile splicing augmentation graphs in the tile splicing augmentation graphs for multiple times according to the size side length to obtain a sample tile splicing graph set.
In one embodiment, the processor when executing the computer program further performs the steps of: converting the labeling vector information according to a projection formula to obtain absolute coordinates of corresponding road elements, wherein the projection formula is as follows:
sinLatitude=sin(latitude×π/180);
absX=((longitude+180)/360)×256×2level
absY=(0.5-log((1+sinLatitude)/(1-sinLatitude))/4π)×256×2level
Wherein latitude and longitude are latitude and longitude coordinates, respectively, of the road element in the geographic coordinate system; level is the level of the sample tile map; absX and absY are the abscissa and ordinate, respectively, of the road element in the absolute coordinate system of the pixel.
In one embodiment, the processor when executing the computer program further performs the steps of: determining absolute coordinates of pixels at the upper left corner in a sample tile mosaic corresponding to each road element; and determining the pixel relative coordinates of the road element in the corresponding sample tile mosaic according to the difference between the absolute coordinates of the road element and the absolute coordinates of the upper left corner pixel.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring two-dimensional maps of target areas under different resolutions; dividing the two-dimensional map to obtain a tile map set; the tile splicing chart set is obtained by splicing the tile charts in the tile chart set; inputting the tile mosaic in the tile mosaic set to the trained road element extraction model, and outputting the pixel relative coordinates of the road elements in the corresponding tile mosaic; and converting the relative coordinates of pixels of the road elements in the corresponding tile mosaic to obtain the vector information of the road elements in the target area.
In one embodiment, the processor when executing the computer program further performs the steps of: and training a road element extraction model, wherein the road element extracted by the road element extraction model comprises at least one of a lane line or a road surface mark.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a two-dimensional sample map of a sample area under different resolutions;
Labeling the road elements on the two-dimensional sample map to obtain labeling vector information;
dividing a two-dimensional sample map to obtain a sample tile map set;
the method comprises the steps of splicing sample tile graphs in a sample tile map set to obtain a sample tile spliced graph set;
Converting the labeling vector information to obtain absolute coordinates of corresponding road elements, and converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road elements in the corresponding sample tile mosaic;
And training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic set as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels to obtain the trained road element extraction model.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a splicing side length and a splicing step length, wherein the splicing step length is smaller than the splicing side length; and according to the splicing side length and the splicing step length, splicing the sample tile graphs in the sample tile map set according to rows or columns to obtain a sample tile splicing graph set.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a splicing side length, a splicing step length and a dimension side length of a tile splicing diagram, wherein the splicing side length is larger than the dimension side length, and the splicing step length is smaller than the splicing side length; according to the splicing side length and the splicing step length, splicing the sample tile graphs in the sample tile map set according to rows or columns to obtain a tile splicing augmentation chart set; and performing rotary cutting on the tile splicing augmentation graphs in the tile splicing augmentation graphs for multiple times according to the size side length to obtain a sample tile splicing graph set.
In one embodiment, the computer program when executed by the processor further performs the steps of: converting the labeling vector information according to a projection formula to obtain absolute coordinates of corresponding road elements, wherein the projection formula is as follows:
sinLatitude=sin(latitude×π/180);
absX=((longitude+180)/360)×256×2level
absY=(0.5-log((1+sinLatitude)/(1-sinLatitude))/4π)×256×2level
Wherein latitude and longitude are latitude and longitude coordinates, respectively, of the road element in the geographic coordinate system; level is the level of the sample tile map; absX and absY are the abscissa and ordinate, respectively, of the road element in the absolute coordinate system of the pixel.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining absolute coordinates of pixels at the upper left corner in a sample tile mosaic corresponding to each road element; and determining the pixel relative coordinates of the road element in the corresponding sample tile mosaic according to the difference between the absolute coordinates of the road element and the absolute coordinates of the upper left corner pixel.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring two-dimensional maps of target areas under different resolutions; dividing the two-dimensional map to obtain a tile map set; the tile splicing chart set is obtained by splicing the tile charts in the tile chart set; inputting the tile mosaic in the tile mosaic set to the trained road element extraction model, and outputting the pixel relative coordinates of the road elements in the corresponding tile mosaic; and converting the relative coordinates of pixels of the road elements in the corresponding tile mosaic to obtain the vector information of the road elements in the target area.
In one embodiment, the computer program when executed by the processor further performs the steps of: and training a road element extraction model, wherein the road element extracted by the road element extraction model comprises at least one of a lane line or a road surface mark.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method of training a road element extraction model, the method comprising:
acquiring a two-dimensional sample map of a sample area under different resolutions;
Labeling the road elements on the two-dimensional sample map to obtain labeling vector information;
Dividing the two-dimensional sample map to obtain a sample tile map set;
the sample tile splicing chart set is obtained by splicing the sample tile charts in the sample tile chart set;
converting the labeling vector information to obtain absolute coordinates of corresponding road elements, and converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road elements in the corresponding sample tile mosaic;
And training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic set as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels to obtain the trained road element extraction model.
2. The method of claim 1, wherein the obtaining a sample tile stitching atlas by stitching sample tile graphs in the sample tile map set comprises:
Acquiring a splicing side length and a splicing step length, wherein the splicing step length is smaller than the splicing side length;
And according to the splicing side length and the splicing step length, splicing the sample tile graphs in the sample tile map set according to rows or columns to obtain a sample tile splicing graph set.
3. The method of claim 1, wherein the obtaining a sample tile stitching atlas by stitching sample tile graphs in the sample tile map set comprises:
Acquiring a splicing side length, a splicing step length and a size side length of a tile splicing diagram, wherein the splicing side length is larger than the size side length, and the splicing step length is smaller than the splicing side length;
according to the splicing side length and the splicing step length, splicing the sample tile graphs in the sample tile map set according to rows or columns to obtain a tile splicing augmentation chart set;
And performing multiple rotary cutting on the tile splicing augmentation graphs in the tile splicing augmentation graphs according to the size side length to obtain a sample tile splicing graph set.
4. The method of claim 1, wherein converting the labeling vector information to obtain absolute coordinates of the corresponding road element comprises:
sinLatitude=sin(latitude×π/180;
absX=((longitude+180)/360×256×2level
absY=(0.5-log((1+sinLatitude)/(1-sinLatitude))/4×256×2level
Wherein latitude and longitude are latitude and longitude coordinates, respectively, of the road element in the geographic coordinate system; level is the level of the sample tile map; absX and absY are the abscissa and ordinate, respectively, of the road element in the absolute coordinate system of the pixel.
5. The method of claim 1, wherein said converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road element in the corresponding sample tile mosaic comprises:
for each road element, determining the absolute coordinates of the upper left corner pixel in a sample tile mosaic corresponding to the road element;
and determining the pixel relative coordinates of the road element in the corresponding sample tile mosaic according to the difference between the absolute coordinates of the road element and the absolute coordinates of the upper left corner pixel.
6. The method according to claim 1, wherein the method further comprises:
Acquiring two-dimensional maps of target areas under different resolutions;
Dividing the two-dimensional map to obtain a tile map set;
the tile map set is obtained by splicing the tile maps in the tile map set;
Inputting the tile mosaic in the tile mosaic set to a trained road element extraction model, and outputting the relative coordinates of pixels of the road elements in the corresponding tile mosaic;
And converting the relative coordinates of pixels of the road elements in the corresponding tile mosaic to obtain the vector information of the road elements in the target area.
7. The method of any one of claims 1 to 6, wherein the road element comprises at least one of a lane line or a road pavement marking.
8. A training device for a road element extraction model, the device comprising:
the sample acquisition module is used for acquiring a two-dimensional sample map of the sample area under different resolutions;
the sample labeling module is used for labeling the road elements on the two-dimensional sample map to obtain labeling vector information;
The map segmentation module is used for segmenting the two-dimensional sample map to obtain a sample tile map set;
The tile splicing module is used for splicing the sample tile graphs in the sample tile map set to obtain a sample tile splicing graph set;
the coordinate conversion module is used for converting the labeling vector information to obtain absolute coordinates of corresponding road elements, and converting the absolute coordinates to obtain pixel relative coordinates of the corresponding road elements in the corresponding sample tile mosaic;
the model training module is used for training the road element extraction model by taking the sample tile mosaic in the sample tile mosaic as a training sample and taking the pixel relative coordinates of the road elements in the sample tile mosaic as training labels, so as to obtain the trained road element extraction model.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202211728953.0A 2022-12-30 2022-12-30 Training method and device for road element extraction model and computer equipment Pending CN118297796A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211728953.0A CN118297796A (en) 2022-12-30 2022-12-30 Training method and device for road element extraction model and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211728953.0A CN118297796A (en) 2022-12-30 2022-12-30 Training method and device for road element extraction model and computer equipment

Publications (1)

Publication Number Publication Date
CN118297796A true CN118297796A (en) 2024-07-05

Family

ID=91676583

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211728953.0A Pending CN118297796A (en) 2022-12-30 2022-12-30 Training method and device for road element extraction model and computer equipment

Country Status (1)

Country Link
CN (1) CN118297796A (en)

Similar Documents

Publication Publication Date Title
US11580755B2 (en) Method, apparatus, and system for determining polyline homogeneity
US12051235B2 (en) Machine learning a feature detector using synthetic training data
US11367208B2 (en) Image-based keypoint generation
US11501104B2 (en) Method, apparatus, and system for providing image labeling for cross view alignment
US20190066328A1 (en) Method, apparatus, and system for a vertex-based evaluation of polygon similarity
CN110796714B (en) Map construction method, device, terminal and computer readable storage medium
EP3706072B1 (en) Method, apparatus, and system for detecting degraded ground paint in an image
CN108921943B (en) Road three-dimensional model modeling method based on lane-level high-precision map
US20210003683A1 (en) Interactive sensor calibration for autonomous vehicles
US20100328462A1 (en) Detecting Common Geographic Features in Images Based on Invariant Components
Ning et al. Exploring the vertical dimension of street view image based on deep learning: a case study on lowest floor elevation estimation
Li et al. Geospatial technology for earth observation
US20200132472A1 (en) Method, apparatus, and system for location correction based on feature point correspondence
CN113178008A (en) Three-dimensional city modeling system and method based on GIS
US10776951B2 (en) Method, apparatus, and system for an asymmetric evaluation of polygon similarity
US11367252B2 (en) System and method for generating line-of-sight information using imagery
US11423611B2 (en) Techniques for creating, organizing, integrating, and using georeferenced data structures for civil infrastructure asset management
US20230206584A1 (en) Method, apparatus, and system for pole extraction from a single image
CN103123263A (en) Method and device for displaying navigation electronic map
Zhou et al. Green urban garden landscape simulation platform based on high-resolution image recognition technology and GIS
CN114238541A (en) Sensitive target information acquisition method and device and computer equipment
US20220058825A1 (en) Attention guidance for correspondence labeling in street view image pairs
CN117853904A (en) Road disease detection method, device, equipment, medium and system
US20230206625A1 (en) Method, apparatus, and system for pole extraction from optical imagery
CN118297796A (en) Training method and device for road element extraction model and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination