A detection and extraction method and system for straight-turn compound arrows

By combining semantic segmentation and arrow classification models, the corner coordinates of straight left-turn and straight right-turn arrows in high-precision maps are extracted, solving the problem of low detection accuracy in the existing technology and realizing a more efficient arrow type. Judgment and processing.

CN114445568BActive Publication Date: 2024-10-01WUHAN ZHONGHAITING DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111572878.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2024-10-01
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

In the production of high-precision maps, the existing technology does not process the straight left turn and straight right turn arrows well, resulting in low detection accuracy.

Method used

Using a method that combines the semantic segmentation model and the arrow classification model, the binary image is extracted by training the semantic segmentation model, the minimum circumscribed rectangle is fitted, and the corner coordinates are extracted based on the gray value label and position characteristics of the arrow to determine the arrow type, especially Post-processing for straight left turn and straight right turn arrows to improve detection accuracy.

Benefits of technology

The detection accuracy of straight left turn and straight right turn arrows is significantly improved, and the processing speed is faster, which greatly improves the detection effect of such arrows.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114445568B_ABST
    Figure CN114445568B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of high-precision map production, and specifically provides a detection and extraction method and system for straight-turn compound arrows, wherein the method includes S1, training a semantic segmentation model, inputting an original image, outputting a mask image, and extracting a binary image according to the grayscale value label of the arrow; S2, training an arrow classification model, fitting a minimum circumscribed rectangle to each arrow in the binary image, clipping the rectangle as the input of the arrow classification model, and obtaining the type of arrow in the rectangular bounding box; S3, judging the arrow type of the rectangular bounding box, if it is a straight left turn or a straight right turn arrow type, extracting the coordinates of the corner points to further judge the arrow type. An efficient method for extracting corner points of straight left turn and straight right turn arrows is proposed, which can accurately extract the corner points of such arrows, and has a fast processing speed, greatly improving the detection accuracy of such arrows.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of high-precision map making, and more specifically, to a detection and extraction method and system for a straight-turn compound arrow. Background Art

[0002] As one of the key technologies of the unmanned driving system, high-precision maps are very different from ordinary navigation maps. In terms of the users, ordinary navigation maps are for drivers, while high-precision maps are for unmanned vehicles. In terms of the information provided, ordinary navigation maps have low position accuracy and little information, and only provide geographical information with road-level accuracy. Drivers cannot know the lane information of the current road and which lane they are in from the navigation map. High-precision maps have accurate road position information and rich road element information, which can allow unmanned vehicles to predict complex road information, such as slope, curvature, heading, etc., and assist modules such as precise positioning and intelligent decision-making to make better judgments and decisions.

[0003] However, in the field of high-precision map production, extracting the real corner point detection of arrows is one of the most important technologies. At present, most methods have high accuracy for simple straight, left or right turn arrows, but the processing effect of more complex straight right turn and straight left turn arrows is not good. Summary of the invention

[0004] The present invention aims to solve the technical problem in the prior art that the processing effect of straight left turn and straight right turn arrows is not good when making high-precision maps.

[0005] The present invention provides a detection and extraction method for a straight-turn compound arrow, comprising the following steps:

[0006] S1, train the semantic segmentation model, input the original image, output the mask image, and extract the binary image according to the gray value label of the arrow;

[0007] S2, training the arrow classification model, fitting a minimum bounding rectangle for each arrow in the binary image, cropping the rectangle as the input of the arrow classification model, and obtaining the arrow type in the rectangular bounding box;

[0008] S3, determining the arrow type of the rectangular bounding box, if it is an arrow type of going straight and turning left or going straight and turning right, extracting the coordinates of the corner points to further determine the arrow type.

[0009] Preferably, the arrows include a straight arrow, a left turn arrow, a right turn arrow, a straight left turn arrow and a straight right turn arrow.

[0010] Preferably, the S1 specifically includes:

[0011] First, the dataset is labeled. Different pixel values ​​of different features in the RGB image are set to different grayscale values, and the background is set to 0.

[0012] Then, the semantic segmentation model is used to train and adjust the parameters of the dataset multiple times to obtain the final semantic segmentation model. The final semantic segmentation model is used to obtain the predicted value of each pixel in the RGB image, thereby outputting a mask image and extracting the binary image of the arrow from it.

[0013] Preferably, S2 specifically includes: inputting the cropped arrow rectangular image into an arrow classification model to obtain the arrow type of the arrow rectangular image.

[0014] Preferably, the extraction of corner points in S3 specifically includes: performing polygon fitting on the arrow type to obtain multiple key points, and fitting a minimum circumscribed rectangle according to the outline of the arrow binary image, calculating the center point of the rectangle, dividing all the key points of the arrow into four quadrants according to the center point, and then obtaining the coordinates of the corner point according to the position characteristics of each corner point in the arrow.

[0015] Preferably, S3 specifically includes: dividing all key points into four quadrants according to the center point of the minimum circumscribed rectangle, in the first quadrant, extracting the corner point with the smallest y coordinate; in the second quadrant, extracting the corner point with the smallest y coordinate, extracting the corner point with the smallest x coordinate, and extracting the corner point with the largest x coordinate; in the third quadrant, taking the two corner points with the largest y coordinate, extracting the corner point with the smallest x coordinate, and extracting the corner point with the largest x coordinate; in the fourth quadrant, extracting the corner point with the largest y coordinate.

[0016] Preferably, in the process of extracting corner points in each quadrant, when a corner point is determined, one corresponding one is deleted from the key points to avoid affecting the judgment of subsequent corner points; after deleting the corner points determined above, the remaining key points of the first and fourth quadrants are merged to obtain the corner point with the largest x coordinate.

[0017] The present invention also provides a detection and extraction system for a straight-turn compound arrow, the detection and extraction system is used to implement a detection and extraction method for a straight-turn compound arrow, comprising:

[0018] The semantic segmentation module is used to train the semantic segmentation model, input the original image, output the mask image, and extract the binary image according to the gray value label of the arrow;

[0019] The arrow classification module is used to train the arrow classification model. Each arrow in the binary image is fitted with a minimum circumscribed rectangle, and the rectangle is clipped as the input of the arrow classification model to obtain the arrow type in the rectangular bounding box.

[0020] The post-processing module is used to determine the arrow type of the rectangular bounding box. If it is an arrow type of going straight and turning left or going straight and turning right, the coordinates of the corner points are extracted to further determine the arrow type.

[0021] The present invention also provides an electronic device, comprising a memory and a processor, wherein the processor is used to implement the steps of a method for detecting and extracting a straight-turn compound arrow when executing a computer management program stored in the memory.

[0022] The present invention also provides a computer-readable storage medium on which a computer management program is stored. When the computer management program is executed by a processor, the steps of the detection and extraction method of the straight-turn compound arrow are implemented.

[0023] Beneficial effect: The present invention provides a detection and extraction method and system for a straight-turn compound arrow, wherein the method includes S1, training a semantic segmentation model, inputting an original image, outputting a mask image, and extracting a binary image according to the grayscale value label of the arrow; S2, training an arrow classification model, fitting a minimum circumscribed rectangle to each arrow in the binary image, cropping the rectangle as the input of the arrow classification model, and obtaining the type of arrow in the rectangular bounding box; S3, judging the type of arrow in the rectangular bounding box, if it is a straight left turn or a straight right turn arrow type, extracting the coordinates of the corner points to further judge the arrow type. An efficient method for extracting corner points of straight left turn and straight right turn arrows is proposed, which can accurately extract the corner points of such arrows, and has a fast processing speed, greatly improving the detection accuracy of such arrows. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A flow chart of a detection and extraction method for a straight-turn compound arrow provided by the present invention;

[0025] Figure 2 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention;

[0026] Figure 3 A schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention;

[0027] Figure 4 A schematic diagram of straight-ahead right turn extraction in a method for detecting and extracting a straight-ahead turn compound arrow provided by the present invention. DETAILED DESCRIPTION

[0028] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0029] Figure 1The present invention provides a detection and extraction method for a straight-turn compound arrow, wherein the method includes S1, training a semantic segmentation model, inputting an original image, outputting a mask image, and extracting a binary image according to the grayscale value label of the arrow; S2, training an arrow classification model, fitting a minimum circumscribed rectangle to each arrow in the binary image, cropping the rectangle as the input of the arrow classification model, and obtaining the type of arrow in the rectangular bounding box; S3, judging the type of arrow in the rectangular bounding box, if it is a straight left turn or a straight right turn arrow type, extracting the coordinates of the corner points to further judge the arrow type. An efficient method for extracting corner points of straight left turn and straight right turn arrows is proposed, which can accurately extract the corner points of such arrows, and has a fast processing speed, greatly improving the detection accuracy of such arrows.

[0030] Reference Figure 1 and attached Figure 4 The detection and extraction method of the straight-turn compound arrow in this embodiment is specifically divided into the following steps:

[0031] Step 1: Train the semantic segmentation model, input the original image, output the mask image, and extract the binary image based on the grayscale value label of the arrow.

[0032] Step 2: Train the arrow classification model, fit a minimum bounding rectangle to each arrow in the binary image, crop the rectangle and use it as the input of the arrow classification model to obtain the arrow type in the rectangular bounding box.

[0033] Step 3: For the arrows for turning left and turning right, call a special post-processing program. Take turning right as an example. Label the 14 corner points of the arrow as follows: Figure 4 As shown in the figure, first, polygon fitting is used to obtain N key points, and then a minimum circumscribed rectangle is fitted according to the outline of the binary arrow image, and the center point of the rectangle is calculated; the N key points of the arrow are divided into four quadrants based on this point; and the coordinates of some corner points can be directly obtained according to the position characteristics of each corner point in the straight-through right turn arrow; the other corner points can be predicted based on the known corner point coordinates because of the large errors in segmentation.

[0034] In a specific implementation scenario, combined with Figure 4 , take the straight right turn arrow as an example:

[0035] In the first step, the arrow detection method of this embodiment uses a semantic segmentation network, i.e., a semantic segmentation model. This type of network can segment arrow pixels more accurately. First, the data set is labeled, and different element pixel values ​​in the RGB image are set to different grayscale values, and the background is set to 0. After that, the data set is trained and adjusted multiple times using the semantic segmentation network to obtain a better semantic segmentation model. Through this model, the predicted value of each pixel in the RGB image can be obtained, thereby outputting a mask image and extracting the binary image of the arrow from it.

[0036] The second step is to train the arrow classification model, fit a minimum enclosing rectangle to each arrow in the binary image, crop the rectangle and use it as the input of the arrow classification model to obtain the arrow type in the rectangular bounding box.

[0037] In the first step, only the pixels of the arrows are segmented, but the specific categories of the arrows are not subdivided. Therefore, a classification model needs to be trained for further classification of the arrows. A minimum enclosing rectangle is fitted to each arrow in the binary image and input into the classification model to obtain the classification of the arrows.

[0038] The third step is to adopt a special post-processing procedure for the arrows of the straight left turn and straight right turn categories. Taking the straight right turn arrow as an example, assuming that the 14 corner points of the straight right turn arrow are as follows: Figure 4 As shown in the figure, N key points are obtained by polygon fitting, and then a minimum circumscribed rectangle is fitted according to the outline of the binary image of the arrow, and the center point of the rectangle is calculated; the N key points of the arrow are divided into four quadrants according to this point; and the coordinates of some corner points can be directly obtained according to the position characteristics of each corner point in the straight-ahead right-turn arrow; the other corner points can be predicted according to the known corner point coordinates because of the large errors in segmentation.

[0039] Divide N key points into four quadrants according to the center point of the minimum circumscribed rectangle. Specifically, in the first quadrant, the corner point with the smallest y coordinate is corner point 7; in the second quadrant, the corner point with the smallest y coordinate is corner point 1, the corner point with the smallest x coordinate is corner point 2, and the corner point with the largest x coordinate is corner point 5; in the third quadrant, first take the two corner points with larger y coordinates, of which the one with the smaller x coordinate is set as corner point 11, and the one with the larger x coordinate is set as corner point 12; in the fourth quadrant, the one with the largest y coordinate is corner point 10. When one of the above corner points is determined, delete one from the N key points to avoid affecting the judgment of subsequent corner points; after deleting the above determined corner points, merge the remaining key points of the first and fourth quadrants, and set the one with the largest x coordinate as corner point 6. This is because corner point 6 may be in the first quadrant or the fourth quadrant when divided, so it needs to be merged at the end to judge corner point 6.

[0040] In addition, in the standard sense, corner points 3 and 4 are located on the line connecting corner points 2 and 5, but because the key points obtained by fitting have more deviations in the positions of 3 and 4, corner points 3 and 4 are predicted through corner points 2 and 5. Here, it is assumed that corner points 3 and 4 are located on the line connecting corner points 2 and 5, and the line segment length of corner points 3 and 4 is approximately 1 / 3 of the length of corner points 5 and 6; therefore, the specific coordinates of corner points 3 and 4 can be obtained by calculation; similarly, the coordinate positions of corner points 8 and 9 can be predicted based on the coordinates of corner points 7 and 10; the specific coordinates of points 13 and 14 also need to be predicted, which are on the line connecting points 4 and 12, and the line segment length of corner points 13 and 14 is approximately 2 / 5 of the line segment length of corner points 4 and 12, and the line segment length of points 14 and 12 is approximately 1 / 5 of the line segment length of points 4 and 12; in turn, the coordinate positions of corner points 13 and 14 can also be calculated.

[0041] It should be pointed out that the above is the detection of the straight right turn arrow. The same principle applies to the detection of the straight left turn arrow, which will not be repeated here.

[0042] The embodiment of the present invention further provides a detection and extraction system for a straight-turn compound arrow, wherein the detection and extraction system is used to implement a detection and extraction method for a straight-turn compound arrow, including:

[0043] The semantic segmentation module is used to train the semantic segmentation model, input the original image, output the mask image, and extract the binary image according to the gray value label of the arrow;

[0044] The arrow classification module is used to train the arrow classification model. Each arrow in the binary image is fitted with a minimum circumscribed rectangle, and the rectangle is clipped as the input of the arrow classification model to obtain the arrow type in the rectangular bounding box.

[0045] The post-processing module is used to determine the arrow type of the rectangular bounding box. If it is an arrow type of going straight and turning left or going straight and turning right, the coordinates of the corner points are extracted to further determine the arrow type.

[0046] See also Figure 2 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 2 As shown, an embodiment of the present invention provides an electronic device, including a memory 1310, a processor 1320, and a computer program 1311 stored in the memory 1310 and executable on the processor 1320. When the processor 1320 executes the computer program 1311, the following steps are implemented: S1, training a semantic segmentation model, inputting an original image, outputting a mask image, and extracting a binary image according to the gray value label of the arrow;

[0047] S2, training the arrow classification model, fitting a minimum bounding rectangle for each arrow in the binary image, cropping the rectangle as the input of the arrow classification model, and obtaining the arrow type in the rectangular bounding box;

[0048] S3, determining the arrow type of the rectangular bounding box, if it is an arrow type of going straight and turning left or going straight and turning right, extracting the coordinates of the corner points to further determine the arrow type.

[0049] See also Figure 3 Schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. Figure 3 As shown, this embodiment provides a computer-readable storage medium 1400, on which a computer program 1411 is stored. When the computer program 1411 is executed by a processor, the following steps are implemented: S1, training a semantic segmentation model, inputting an original image, outputting a mask image, and extracting a binary image according to the gray value label of the arrow;

[0050] S2, training the arrow classification model, fitting a minimum bounding rectangle for each arrow in the binary image, cropping the rectangle as the input of the arrow classification model, and obtaining the arrow type in the rectangular bounding box;

[0051] S3, determining the arrow type of the rectangular bounding box, if it is an arrow type of going straight and turning left or going straight and turning right, extracting the coordinates of the corner points to further determine the arrow type.

[0052] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0053] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0054] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0055] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0056] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0057] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0058] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A detection and extraction method for a straight-turn compound arrow, characterized in that: The following steps are involved: S1, train the semantic segmentation model, input the original image, output the mask image, and extract the binary image according to the gray value label of the arrow; S2, training the arrow classification model, fitting a minimum bounding rectangle for each arrow in the binary image, cropping the rectangle as the input of the arrow classification model, and obtaining the arrow type in the rectangular bounding box; S3, determining the arrow type of the rectangular bounding box, if it is an arrow type of going straight and turning left or going straight and turning right, extracting the coordinates of the corner points to further determine the arrow type; The step of extracting the corner points in S3 specifically includes: performing polygon fitting on the arrow type to obtain a plurality of key points, fitting a minimum circumscribed rectangle according to the outline of the arrow binary image, calculating the center point of the rectangle, dividing all the key points of the arrow into four quadrants according to the center point, and obtaining the coordinates of the corner points according to the position characteristics of each corner point in the arrow; S3 specifically includes: dividing all key points into four quadrants according to the center point of the minimum circumscribed rectangle, extracting the corner point with the smallest y coordinate in the first quadrant; extracting the corner point with the smallest y coordinate, extracting the corner point with the smallest x coordinate, and extracting the corner point with the largest x coordinate in the second quadrant; in the third quadrant, taking the two corner points with the largest y coordinate, extracting the corner point with the smallest x coordinate, and extracting the corner point with the largest x coordinate; in the fourth quadrant, extracting the corner point with the largest y coordinate; In the process of extracting corner points in each quadrant, when a corner point is determined, one corresponding one is deleted from the key points to avoid affecting the judgment of subsequent corner points; after deleting the corner points determined above, the remaining key points of the first and fourth quadrants are merged to obtain the corner point with the largest x coordinate.

2. The detection and extraction method of the straight-turn compound arrow according to claim 1 is characterized in that: The arrows include a straight arrow, a left turn arrow, a right turn arrow, a straight left turn arrow, and a straight right turn arrow.

3. The detection and extraction method of the straight-turn compound arrow according to claim 1 is characterized in that: The S1 specifically includes: First, the dataset is labeled. Different pixel values ​​of different features in the RGB image are set to different grayscale values, and the background is set to 0. Then, the semantic segmentation model is used to train and adjust the parameters of the dataset multiple times to obtain the final semantic segmentation model. The final semantic segmentation model is used to obtain the predicted value of each pixel in the RGB image, thereby outputting a mask image and extracting the binary image of the arrow from it.

4. The detection and extraction method of the straight-turn compound arrow according to claim 1 is characterized in that: S2 shown specifically includes: inputting the cropped arrow rectangular image into an arrow classification model to obtain the arrow type of the arrow rectangular image.

5. A detection and extraction system for straight-turn compound arrows, characterized in that: The detection and extraction system is used to implement the detection and extraction method of the straight-turn compound arrow according to any one of claims 1 to 4, comprising: The semantic segmentation module is used to train the semantic segmentation model, input the original image, output the mask image, and extract the binary image according to the gray value label of the arrow; The arrow classification module is used to train the arrow classification model. Each arrow in the binary image is fitted with a minimum circumscribed rectangle, and the rectangle is clipped as the input of the arrow classification model to obtain the arrow type in the rectangular bounding box. A post-processing module is used to determine the arrow type of the rectangular bounding box. If it is an arrow type of going straight and turning left or going straight and turning right, the coordinates of the corner points are extracted to further determine the arrow type; The post-processing module extracts corner points specifically including: performing polygon fitting on the arrow type to obtain multiple key points, fitting a minimum circumscribed rectangle according to the outline of the arrow binary image, calculating the center point of the rectangle, dividing all the key points of the arrow into four quadrants according to the center point, and then obtaining the coordinates of the corner points according to the position characteristics of each corner point in the arrow; The post-processing module is used to determine the arrow type of the rectangular bounding box. If the arrow type is a straight left turn or a straight right turn, the coordinates of the corner points are extracted to further determine the arrow type, including: Divide all key points into four quadrants according to the center point of the minimum circumscribed rectangle. In the first quadrant, extract the corner point with the smallest y coordinate; in the second quadrant, extract the corner point with the smallest y coordinate, extract the corner point with the smallest x coordinate, and extract the corner point with the largest x coordinate; in the third quadrant, take the two corner points with the largest y coordinate, extract the corner point with the smallest x coordinate, and extract the corner point with the largest x coordinate; in the fourth quadrant, extract the corner point with the largest y coordinate; In the process of extracting corner points in each quadrant, when a corner point is determined, one corresponding one is deleted from the key points to avoid affecting the judgment of subsequent corner points; after deleting the corner points determined above, the remaining key points of the first and fourth quadrants are merged to obtain the corner point with the largest x coordinate.

6. An electronic device, characterized in that: It comprises a memory and a processor, wherein the processor is used to implement the steps of the detection and extraction method of the straight-turn compound arrow as described in any one of claims 1 to 4 when executing the computer management program stored in the memory.

7. A computer-readable storage medium, characterized in that: A computer management program is stored thereon, and when the computer management program is executed by a processor, the steps of the detection and extraction method of the straight-turn compound arrow as described in any one of claims 1-4 are implemented.