Traffic sign extraction method and device, electronic equipment and computer storage medium
By clustering point cloud data and optimizing the clusters using elevation and/or level values, the problem of inaccurate traffic sign extraction in existing technologies is solved, achieving higher extraction accuracy.
Patent Information
- Application Number
- CN202311576380.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-23
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-11-23
AI Technical Summary
In the automated production of high-precision maps, existing technologies based on the combination of deep learning and point cloud methods struggle to correctly classify point clouds, resulting in significant discrepancies between traffic sign extraction results and actual results, making it difficult to ensure extraction accuracy.
By clustering point cloud data and then optimizing the clusters using elevation and/or horizontal values, the accuracy of traffic sign extraction can be improved.
By optimizing the clustering, the deviation between the traffic sign extraction results and the actual results was reduced, and the accuracy of traffic sign extraction was improved.
Smart Images

Figure CN118823725B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and computer storage medium for extracting traffic signs. Background Technology
[0002] Currently, with the rapid development of autonomous driving technology, the demand for high-precision maps is increasing rapidly. In the automated production of high-precision maps, a method combining deep learning and point cloud analysis is commonly used to extract traffic signs. However, this method suffers from the problem of incorrectly classifying point clouds, resulting in significant discrepancies between the extracted traffic signs and the actual results, making it difficult to ensure the accuracy of traffic sign extraction. Summary of the Invention
[0003] This application provides a method, apparatus, electronic device, and computer storage medium for extracting traffic signs, which can improve the accuracy of traffic sign extraction.
[0004] The technical solution of this application is implemented as follows:
[0005] This application provides a method for retrieving traffic signs, the method comprising:
[0006] Data is collected from the target area to obtain image data, position and orientation system (POS) data, and point cloud data; the image data includes at least one traffic sign.
[0007] The image data is identified using a traffic sign recognition model to obtain recognition results; the recognition results include the image region corresponding to each traffic sign.
[0008] Based on the POS data, the point cloud data corresponding to each image region in the recognition result is determined, and the point cloud data corresponding to each image region is clustered to obtain at least one cluster; each cluster includes multiple target point clouds;
[0009] Each cluster is optimized based on the measured values of the multiple target point clouds, and the extraction of at least one traffic sign is completed based on each optimized cluster; the measured values include at least one of elevation and level values.
[0010] In some embodiments, where the measured values include the elevation values, optimizing each cluster based on the measured values of the plurality of target point clouds includes:
[0011] Based on the elevation values of the multiple target point clouds, the multiple target point clouds are sorted to obtain a first sequence;
[0012] Based on the first sequence, determine the top elevation value and bottom elevation value corresponding to each cluster;
[0013] Each cluster is optimized based on the top elevation value and the bottom elevation value.
[0014] In some embodiments, where the measured values include the level values, optimizing each cluster based on the measured values of the plurality of target point clouds includes:
[0015] Based on the horizontal values of the multiple target point clouds, the multiple target point clouds are sorted to obtain a second sequence;
[0016] Based on the second sequence, determine the left-hand level value and the right-hand level value corresponding to each cluster;
[0017] Each cluster is optimized based on the left-hand level value and the right-hand level value.
[0018] In some embodiments, when the measured values include the elevation value and the level value, optimizing each cluster based on the measured values of the plurality of target point clouds includes:
[0019] Based on the elevation values of the multiple target point clouds, the multiple target point clouds are sorted to obtain a third sequence;
[0020] Based on the third sequence, determine the top elevation value and bottom elevation value corresponding to each cluster;
[0021] Based on the horizontal values of the multiple target point clouds, the multiple target point clouds are sorted to obtain a fourth sequence;
[0022] Based on the fourth sequence, determine the left-hand level value and the right-hand level value corresponding to each cluster;
[0023] Each cluster is optimized based on the top elevation value, the bottom elevation value, the left horizontal value, and the right horizontal value.
[0024] In some embodiments, determining the top elevation value and bottom elevation value corresponding to each cluster based on the first sequence includes:
[0025] Line segments are fitted to the elevation values of multiple target point clouds in the first sequence to obtain fitted line segments;
[0026] The curvature of the fitted line segment is calculated to obtain the maximum curvature and the minimum curvature;
[0027] The elevation value corresponding to the maximum curvature is determined as the top elevation value corresponding to each cluster, and the elevation value corresponding to the minimum curvature is determined as the bottom elevation value corresponding to each cluster.
[0028] In some embodiments, the method further includes:
[0029] According to a preset filtering threshold, each image region included in the recognition result is filtered to obtain the target recognition result; the target recognition result includes at least one image region.
[0030] The step of determining the point cloud data corresponding to each image region in the recognition result based on the POS data includes:
[0031] Based on the POS data, the point cloud data corresponding to each image region in the target recognition result is determined.
[0032] In some embodiments, the method further includes:
[0033] Obtain a traffic sign dataset; the traffic sign dataset includes multiple traffic sign images containing traffic signs;
[0034] The corresponding border area of each traffic sign in each traffic sign image is filled with grayscale to obtain the corresponding label data.
[0035] A training dataset is constructed based on each traffic sign image and its corresponding label data;
[0036] The traffic sign recognition model is obtained by training the initial recognition model using the training dataset.
[0037] This application provides a traffic sign retrieval device, the device comprising:
[0038] The data acquisition module is used to acquire data from the target area to obtain image data, POS data, and point cloud data; the image data includes at least one traffic sign.
[0039] The recognition module is used to recognize the image data using a traffic sign recognition model to obtain recognition results; the recognition results include the image region corresponding to each traffic sign.
[0040] The clustering module is used to determine the point cloud data corresponding to each image region in the recognition result based on the POS data, and to cluster the point cloud data corresponding to each image region to obtain at least one cluster; each cluster includes multiple target point clouds;
[0041] An optimization module is used to optimize each cluster based on the measurement values of the multiple target point clouds, and to extract the at least one traffic sign based on each optimized cluster; the measurement values include at least one of elevation and level values.
[0042] This application provides an electronic device, the device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the traffic sign extraction method provided by one or more of the foregoing technical solutions.
[0043] This application provides a computer storage medium storing a computer program; when the computer program is executed, it can implement the traffic sign extraction method provided by one or more of the aforementioned technical solutions.
[0044] This application provides a traffic sign extraction method, apparatus, electronic device, and computer storage medium. The method includes: acquiring data from a target area to obtain image data, POS data, and point cloud data; the image data includes at least one traffic sign; using a traffic sign recognition model to recognize the image data to obtain a recognition result; the recognition result includes an image region corresponding to each traffic sign; determining the point cloud data corresponding to each image region in the recognition result based on the POS data, and clustering the point cloud data corresponding to each image region to obtain at least one cluster; each cluster includes multiple target point clouds; optimizing each cluster based on the measurement values of the multiple target point clouds; and extracting the at least one traffic sign based on the optimized cluster; the measurement values include at least one of elevation and level values.
[0045] As can be seen, in this embodiment of the application, after clustering the point cloud data corresponding to each image region, the elevation and / or horizontal values of the point cloud in each cluster are used to further optimize the clustering results, so that the traffic sign height and / or width information represented by the optimized clusters are closer to the traffic signs in the real scene. Based on the optimized clusters, the extraction of traffic signs can greatly reduce the deviation between the traffic sign extraction results and the real results, and effectively improve the accuracy of traffic sign extraction. Attached Figure Description
[0046] Figure 1 A flowchart illustrating a traffic sign extraction method provided in this application embodiment;
[0047] Figure 2A This is a scene illustration of a traffic sign image provided in an embodiment of this application;
[0048] Figure 2BThis is a schematic diagram of the result of tag data provided in an embodiment of this application;
[0049] Figure 3A This is a scene illustration of image data provided in an embodiment of this application;
[0050] Figure 3B This is a schematic diagram of an identification result provided in an embodiment of this application;
[0051] Figure 4A This is a broken line diagram illustrating the elevation distribution of a rectangular traffic sign provided in an embodiment of this application;
[0052] Figure 4B This is a broken line diagram illustrating the elevation distribution of a circular traffic sign provided in an embodiment of this application.
[0053] Figure 4C This is a broken line diagram illustrating the elevation distribution of a triangular traffic sign provided in an embodiment of this application.
[0054] Figure 5A This is a schematic diagram illustrating the result of traffic sign extraction before cluster optimization, as provided in an embodiment of this application.
[0055] Figure 5B This is a schematic diagram illustrating the result of traffic sign extraction after cluster optimization, as provided in an embodiment of this application.
[0056] Figure 6 This is a schematic diagram of the composition of the traffic sign retrieval device provided in the embodiments of this application;
[0057] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0058] The technical solutions in this application will now be clearly and completely described with reference to the accompanying drawings.
[0059] The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are merely illustrative of the present application and are not intended to limit the present application. Furthermore, the embodiments provided below are some embodiments for implementing the present application, and not all embodiments for implementing the present application. Unless otherwise specified, the technical solutions described in the present application can be implemented in any combination.
[0060] It should be noted that, in this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a method or apparatus that includes a list of elements includes not only the elements expressly stated, but also other elements not expressly listed, or elements inherent to implementing the method or apparatus. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other related elements (e.g., steps in the method or units in the apparatus, such as portions of a processor, program, or software, etc.) in the method or apparatus that includes that element.
[0061] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0062] For example, the traffic sign extraction method provided in this application includes a series of steps, but the traffic sign extraction method provided in this application is not limited to the steps described therein. Similarly, the traffic sign extraction device provided in this application includes a series of modules, but the traffic sign extraction device provided in this application is not limited to the modules explicitly described, but may also include modules that need to be set up for obtaining relevant information or processing based on the information.
[0063] This application can be implemented based on electronic devices, which may be thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, minicomputer systems, etc.
[0064] Among related technologies, methods for automated production of high-precision maps can be mainly divided into three categories: methods based on manual drawing, methods based on a combination of deep learning and point clouds, and point cloud classification based on deep learning. However, methods based on manual drawing suffer from long production cycles and high costs; methods based on a combination of deep learning and point clouds have the problem of difficulty in correctly classifying point clouds, resulting in a large deviation between the traffic sign extraction results and the actual results, making it difficult to meet the needs of automated production of high-precision maps; point cloud classification based on deep learning requires a lot of time for model training and individual point cloud processing, resulting in low traffic sign extraction efficiency, making it difficult to apply to actual production.
[0065] To address the above problems, the following embodiments are proposed.
[0066] In some embodiments of this application, the traffic sign extraction method can be implemented using a processor in the traffic sign extraction device. The processor can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), controller, microcontroller, and microprocessor.
[0067] In this embodiment of the application, the traffic sign extraction method can be applied to scenarios related to high-precision maps. Here, the type of scenario is not specifically limited. For example, it can be a high-precision map production scenario, a high-precision map update scenario, or other related scenarios.
[0068] Figure 1 A flowchart of a traffic sign extraction method provided in this application embodiment is shown below. Figure 1 As shown, the process may include:
[0069] Step 100: Collect data from the target area to obtain image data, POS data, and point cloud data.
[0070] Here, the target area can be any area including traffic signs, such as straight-ahead intersections, turning intersections, and other road areas; in this embodiment, traffic signs are also called traffic signs or traffic markers; exemplary, a mobile data acquisition device integrating surveying equipment such as cameras, inertial measurement units (IMUs), lidar, and global positioning system (GPS) receivers can be used to collect data from the target area to obtain POS data and point cloud data; wherein, the mobile data acquisition device can be a field data acquisition vehicle or a drone, etc.
[0071] For example, image data can be obtained through cameras positioned on and / or around the mobile acquisition device, such as monocular or binocular cameras; the image data can be panoramic image data or image data from one direction, such as forward, left, or right image data. POS data can be obtained through an IMU and GPS receiver mounted on the mobile acquisition device. Point cloud data can be obtained through a LiDAR or photogrammetric radar mounted on the mobile acquisition device.
[0072] For example, during the movement of the mobile acquisition device, it can collect data from the target area at set time intervals to obtain corresponding image data, POS data and point cloud data, and store the acquired data. Here, the value of the set time interval can be set according to the actual situation, and this application embodiment does not limit it. For example, it can be set to 1S or 2S, etc.
[0073] For example, the image data may include at least one traffic sign; wherein, the traffic sign represents a road traffic sign, which is a facility that uses graphic symbols, colors, and text to convey specific information to traffic participants for traffic management and safety; here, there is no limitation on the shape category of the traffic sign; for example, the shape category of the traffic sign may include circles, triangles, and rectangles. POS data may include the position data and attitude data of the mobile acquisition device when acquiring image data; here, the position data may be specific position coordinates, and the attitude data may include angle data. Point cloud data may be a collection of massive point clouds acquired by LiDAR or photogrammetric radar; wherein, the point cloud data may be stored by constructing an octree.
[0074] Step 101: Use a traffic sign recognition model to identify the image data and obtain the recognition results.
[0075] For example, after acquiring image data, a pre-trained traffic sign recognition model can be obtained, and the traffic sign recognition model can be used to process the image data to obtain the recognition result.
[0076] It should be noted that before inputting the image data into the traffic sign recognition model, it is advisable to first determine whether the size of the image data is larger than the input size of the traffic sign recognition model. If it is, the image data can be segmented according to the model's input size so that the size of the segmented image data matches the input size of the traffic sign recognition model. Then, the segmented image data can be input into the traffic sign recognition model for recognition processing. Conversely, if it is not, it means that the size of the image data meets the model's input requirements. In this case, the image data can be directly input into the traffic sign recognition model for recognition processing.
[0077] For example, the traffic sign recognition model can be a model trained based on a deep learning neural network model. After obtaining the trained traffic sign recognition model, the model can be saved as a model file for later use. Here, the type of model file is related to the neural network model. For example, if the neural network model is a TensorFlow model, the model file can be a protocol buffer (pb) model file. Here, the pb model file is a binary file that represents the model structure. The training process of the traffic sign recognition model is illustrated below.
[0078] In some embodiments, the training process of a traffic sign recognition model may include the following steps: obtaining a traffic sign dataset; filling the border region corresponding to each traffic sign in each traffic sign image with grayscale to obtain the corresponding label data; constructing a training dataset based on each traffic sign image and label data; and training the initial recognition model using the training dataset to obtain the traffic sign recognition model.
[0079] In this embodiment of the application, the traffic sign dataset may include multiple traffic sign images containing traffic signs; wherein, the traffic sign dataset may be a currently publicly available traffic sign dataset, for example, it may be the TT100k dataset, or it may be other types of traffic sign datasets, which are not limited here.
[0080] For example, after obtaining the traffic sign dataset, each traffic sign image included in the dataset can be preprocessed. The preprocessing operations may include, but are not limited to, adjusting the image size and standardization.
[0081] Furthermore, after obtaining each preprocessed traffic sign image, for each traffic sign contained in each traffic sign image, the corresponding bounding box region can be determined first using an object detection model. Then, the bounding box regions corresponding to each traffic sign are filled with grayscale to obtain the label data corresponding to each traffic sign image. Here, after filling the bounding box region corresponding to a certain traffic sign with grayscale, the filled region can be used as the image region corresponding to that traffic sign.
[0082] It should be noted that during the grayscale filling process, in order to distinguish traffic signs of different shape categories, different grayscale values can be used to fill the border areas corresponding to traffic signs of different shape categories. For example, if a traffic sign image contains traffic signs of three shape categories: circle, triangle, and rectangle, three different grayscale values of 50, 100, and 150 can be used to fill the border areas of the circle, triangle, and rectangle respectively to obtain the label data corresponding to the traffic sign image.
[0083] For example, Figure 2A This is a scene illustration of a traffic sign image provided in an embodiment of this application, such as... Figure 2A As shown, by filling the border areas corresponding to each traffic sign in the traffic sign image with grayscale, the label data corresponding to the traffic sign image can be obtained, such as... Figure 2B As shown.
[0084] Furthermore, after obtaining the images of each traffic sign and their corresponding label data, a training dataset can be constructed. This training dataset is then used to train the initial recognition model, resulting in a trained traffic sign recognition model. This traffic sign recognition model can then be used to identify the acquired image data, yielding the corresponding recognition result. Assuming the acquired image data is as follows... Figure 3A As shown in Figure 3B, the image data is then identified using a traffic sign recognition model, and the recognition result is shown in Figure 3B.
[0085] As can be seen, although a deep learning model needs to be trained for recognition processing in this embodiment, the model has low requirements for training samples. Most open-source samples are applicable to this method, which can solve the problem of requiring a lot of time for model training and individual point cloud processing in related technologies. This can improve the efficiency of model training and thus ensure the efficiency of subsequent traffic sign extraction.
[0086] It should be noted that the above recognition results may include image regions corresponding to one or more traffic signs, wherein the image regions may be regions generated based on traffic signs in image data (see...). Figure 3B The Y1 to Y4 regions shown may also be regions generated based on noise data in the image data (see [link]). Figure 3B (as shown in the N1 region); In order to improve the accuracy of the recognition results and ensure the accuracy of subsequent traffic sign extraction, the image regions caused by noise data in the recognition results can also be filtered after the recognition results are obtained.
[0087] In some embodiments, the above method may further include: filtering each image region included in the recognition result according to a preset filtering threshold to obtain a target recognition result; the target recognition result includes at least one image region.
[0088] Here, the filtering threshold is a threshold set according to the number of pixels. It can be understood that compared to the number of pixels corresponding to traffic signs, the number of pixels corresponding to noise data is relatively small. Therefore, a filtering threshold can be preset according to the actual situation. According to the filtering threshold, the image regions included in the recognition result are filtered to obtain the target recognition result. In this way, the reliability of the target recognition result can be improved.
[0089] For example, suppose the above recognition result includes image region A and image region B, and the number of pixels corresponding to image region A is 3000 and the number of pixels corresponding to image region B is 500. If 2000 pixels are set as the filtering threshold, image region B will be filtered out. In this case, the target recognition result only includes image region A.
[0090] Step 102: Based on the POS data, determine the point cloud data corresponding to each image region in the recognition result, and cluster the point cloud data corresponding to each image region to obtain at least one cluster.
[0091] In this embodiment of the application, after obtaining the target recognition result according to the above steps, the point cloud data corresponding to each image region in the target recognition result can be determined according to the POS data.
[0092] For example, the image point coordinates of the point cloud data can be determined first based on the POS data, and then the point cloud data corresponding to each image region in the target recognition result can be determined based on the image point coordinates of the point cloud data.
[0093] In some embodiments, determining the image point coordinates of point cloud data based on POS data may include: extracting features from image data to obtain multiple target feature points; using POS data to determine the image point coordinates of each of the multiple target feature points; and mapping the point cloud data based on the image point coordinates of each of the multiple target feature points to obtain the image point coordinates of the point cloud data.
[0094] Here, the target feature points are the feature points corresponding to traffic signs in the image data, that is, the feature points corresponding to each image region in the image data. For example, feature extraction algorithms can be used to extract features from the image data to obtain multiple target feature points. Here, the type of feature extraction algorithm is not limited. For example, it can be the Histogram of Oriented Gradients (HOG) feature extraction algorithm, or other types of feature extraction algorithms.
[0095] For example, after obtaining multiple target feature points, the position coordinates and attitude data of the mobile acquisition device included in the POS data can be used to calculate the image coordinates of each of the multiple target feature points; further, after obtaining the image coordinates of each of the multiple target feature points, the point cloud data can be mapped according to the image coordinates of each of the multiple target feature points to obtain the image coordinates of the point cloud data; it should be noted that the image coordinates of the point cloud data represent the image coordinates of the point cloud data in the camera coordinate system.
[0096] For example, point cloud data mapping establishes the relative relationship between point cloud data and image data. By transforming the world coordinates of the point cloud data to the camera coordinate system through coordinate transformation, the image point coordinates corresponding to the point cloud data in the camera coordinate system are obtained, as shown in formula (1).
[0097]
[0098] Among them, X c Y c Z c Represents the image point coordinates of the point cloud data in the camera coordinate system; X w Y w Z w R represents the 3D coordinates of the point cloud data in the world coordinate system, R represents the orthogonal unit rotation matrix, and t represents the 3D translation vector. The rotation matrices in the three directions can be obtained based on the rotation angle, and are respectively R... x R y and R z The orthogonal identity rotation matrix is their product: R = R x *R y *R z .
[0099] Furthermore, after obtaining the image point coordinates of the point cloud data in the camera coordinate system, the image point coordinates of the point cloud data in the camera coordinate system can be transformed into pixel coordinates in the image coordinate system using formula (2):
[0100]
[0101] Where x, y, and z represent the pixel coordinates of the point cloud data in the image coordinate system, and f represents the camera focal length, which is the difference between the camera coordinate system and the image coordinate system on the Z-axis.
[0102] For example, after obtaining the pixel coordinates corresponding to the point cloud data, the color values corresponding to the pixel coordinates, namely, red (R), green (G), and blue (B) values, can be assigned to the point cloud in the point cloud data, thereby fusing the color information into the point cloud data.
[0103] For example, after obtaining the pixel coordinates and color information of the point cloud data, the pixel coordinates of each of the multiple target feature points can be matched with the pixel coordinates of the point cloud data to determine the point clouds in the point cloud data that have the same pixel coordinates as each target feature point. Based on each point cloud and its corresponding color information, the point cloud data corresponding to each image region in the target recognition result can be determined.
[0104] In this embodiment of the application, after obtaining the point cloud data corresponding to each image region in the target recognition result, the point cloud data corresponding to each image region can be clustered to obtain at least one cluster; wherein, each cluster includes multiple target point clouds.
[0105] Here, there is no limitation on the method of clustering point cloud data. For example, it can be clustered using a Point Cloud Library (PCL) or other clustering methods.
[0106] For example, there is a one-to-one correspondence between clusters and image regions. For the point cloud data corresponding to each image region, if PCL clustering is used for clustering, the following steps can be included: First, initialize a candidate set U, and randomly select a point cloud p0 from all point clouds corresponding to the image region as a seed. Then, use a kd-tree to find the n point clouds closest to point cloud p0, and calculate the distance between point cloud p0 and the n point clouds respectively. If the distance between point cloud p0 and a certain point cloud is less than or equal to a preset distance threshold r, the point cloud can be added to the candidate set U. Otherwise, if the distance between point cloud p0 and a certain point cloud is greater than the preset distance threshold r, the point cloud is not added. Next, randomly select a point cloud p1 from all point clouds corresponding to the image region as a seed, and continue to repeat the above steps until there are no more point clouds to add to the candidate set U. At this time, the current process ends. At this time, the candidate set U can be used as the cluster corresponding to the image region. This process continues until the clusters corresponding to each image region in the target recognition result are obtained.
[0107] Here, the values of the point cloud number n and the distance threshold r can be set according to the actual situation. This application embodiment does not limit this. For example, the value of the point cloud number n can be 20 or 30, and the value of the distance threshold r can be 0.5cm or 1cm, etc.
[0108] Step 103: Optimize each cluster based on the measurements of multiple target point clouds, and extract at least one traffic sign based on each optimized cluster.
[0109] Here, the measured values may include at least one of elevation and level values; for example, after obtaining at least one cluster, the elevation and level values of each target point cloud included in each cluster can be obtained by measuring equipment such as a level set on the mobile acquisition device, and then each cluster can be optimized based on at least one of the measured elevation and level values of the multiple target point clouds.
[0110] In some embodiments, where the measured values include elevation values, optimizing each cluster based on the measured values of multiple target point clouds may include: sorting the multiple target point clouds according to their elevation values to obtain a first sequence; determining the top elevation value and bottom elevation value corresponding to each cluster based on the first sequence; and optimizing each cluster based on the top elevation value and bottom elevation value.
[0111] For example, after obtaining the elevation values of multiple target point clouds in each cluster, the multiple target point clouds can be sorted according to a set order to obtain the sorting result, i.e., the first sequence; here, the set order can be from small to large or from large to small; it should be noted that each target point cloud has a corresponding elevation value, and the elevation values of different target point clouds can be the same or different.
[0112] For example, suppose that multiple target point clouds in each cluster are sorted in ascending order of elevation value to obtain a first sequence X; here, the first sequence X can be represented as (z1, z2, z3, ..., zn), where z1, z2, z3, ..., zn represent the elevation values of different target point clouds, z1 is the minimum elevation value in the cluster, and zn is the maximum elevation value in the cluster.
[0113] Furthermore, after obtaining the first sequence, the top elevation value and bottom elevation value corresponding to each cluster can be determined based on the first sequence. This can include: fitting line segments to the elevation values of multiple target point clouds in the first sequence to obtain fitted line segments; calculating the curvature of the fitted line segments to obtain the maximum curvature and minimum curvature; determining the elevation value corresponding to the maximum curvature as the top elevation value corresponding to each cluster, and determining the elevation value corresponding to the minimum curvature as the bottom elevation value corresponding to each cluster.
[0114] Here, each cluster corresponds to a traffic sign, with the top elevation value also called the upper elevation value and the bottom elevation value also called the lower elevation value. Understandably, although there are many shapes of traffic signs, circular, triangular, and rectangular traffic signs generally account for the majority. To verify universality, we can select clusters of these three shape categories for elevation analysis. For example, to more intuitively display the elevation distribution, after obtaining the first sequence corresponding to each cluster, we can first connect the elevation values of multiple target point clouds in the first sequence to obtain a line graph of elevation values versus the number of target point clouds. Figures 4A to 4C The line segment shown is then fitted to the line graph to obtain the fitted line segment, corresponding to... Figures 4A to 4C The dashed line segment is shown; then the curvature of the fitted line segment is calculated to obtain the maximum curvature and the minimum curvature; finally, the elevation value corresponding to the maximum curvature is determined as the top elevation value corresponding to each traffic sign, and the elevation value corresponding to the minimum curvature is determined as the bottom elevation value corresponding to each traffic sign.
[0115] For example, the edges of traffic signs can be determined by curvature calculation. Since the size of traffic signs is significantly different from that of associated poles, trees, and other elements, it is generally assumed that the size of traffic signs is less than 1 / 3 of that of poles, trees, and other elements (i.e., the size of traffic signs should be more than 3 times the width or height of surrounding elements to prevent classification errors). The maximum curvature and minimum curvature are equivalent to two inflection points. After obtaining the two maximum curvatures and minimum curvatures, the elevation values corresponding to the maximum curvature and minimum curvature can be determined as the top elevation value and bottom elevation value corresponding to each cluster.
[0116] Understandably, the difference between the top elevation value and the bottom elevation value is the height information of the traffic sign corresponding to the cluster. After obtaining the top elevation value and the bottom elevation value corresponding to each cluster, it is equivalent to obtaining the height information of the traffic sign corresponding to each cluster. At this time, the cluster can be optimized based on the height information to ensure the height accuracy when extracting traffic signs in the future.
[0117] In some embodiments, where the measured values include level values, optimizing each cluster based on the measured values of multiple target point clouds may include: sorting the multiple target point clouds according to the level values of the multiple target point clouds to obtain a second sequence; determining the left level value and the right level value corresponding to each cluster according to the second sequence; and optimizing each cluster based on the left level value and the right level value.
[0118] For example, after obtaining the level values of multiple target point clouds in each cluster, the multiple target point clouds can also be sorted according to a set order to obtain the sorting result, i.e., the second sequence; here, the set order can be from small to large or from large to small; it should be noted that each target point cloud has a corresponding level value, and the level values of different target point clouds can be the same or different.
[0119] For example, suppose that multiple target point clouds in each cluster are sorted in ascending order of level value to obtain a first sequence Y. Here, the second sequence Y can be represented as (t1, t2, t3, ..., tn), where t1, t2, t3, ..., tn represent the level values of different target point clouds, t1 is the minimum level value in the cluster, and tn is the maximum level value in the cluster.
[0120] Furthermore, after obtaining the second sequence, the left and right level values corresponding to each cluster can be determined based on the second sequence; the process of determining the left and right level values is similar to the process of determining the top and bottom elevation values described above, and will not be repeated here to avoid repetition.
[0121] Understandably, the difference between the left and right horizontal values is the width information of the traffic sign corresponding to the cluster. After obtaining the left and right horizontal values for each cluster, it is equivalent to obtaining the width information of the traffic sign corresponding to each cluster. At this point, the cluster can be optimized based on the width information to ensure the accuracy of the width when extracting traffic signs in the future.
[0122] In some embodiments, where the measured values include elevation and level values, optimizing each cluster based on the measured values of multiple target point clouds may include: sorting the multiple target point clouds according to their elevation values to obtain a third sequence; determining the top and bottom elevation values corresponding to each cluster based on the third sequence; sorting the multiple target point clouds according to their level values to obtain a fourth sequence; determining the left and right level values corresponding to each cluster based on the fourth sequence; and optimizing each cluster based on the top, bottom, left, and right level values.
[0123] Here, the process of determining the third sequence and, based on the third sequence, determining the top and bottom elevation values corresponding to each cluster can be referred to as the process of determining the first sequence and, based on the first sequence, determining the top and bottom elevation values corresponding to each cluster described above; similarly, the process of determining the fourth sequence and, based on the fourth sequence, determining the left and right horizontal values corresponding to each cluster can be referred to as the process of determining the second sequence and, based on the second sequence, determining the left and right horizontal values corresponding to each cluster described above; to avoid repetition, it will not be elaborated here.
[0124] For example, as described above, the difference between the top elevation value and the bottom elevation value is the height information of the traffic sign corresponding to the cluster, and the difference between the left horizontal value and the right horizontal value is the width information of the traffic sign corresponding to the cluster. After obtaining the top elevation value, bottom elevation value, left horizontal value, and right horizontal value corresponding to each cluster, it is equivalent to obtaining the height information and width information of the traffic sign corresponding to each cluster. At this time, the cluster can be optimized based on the height information and width information to ensure the size accuracy when extracting traffic signs in the future.
[0125] Furthermore, after obtaining the top elevation value, bottom elevation value, left horizontal value, and right horizontal value corresponding to each cluster, vector modeling can be performed on each cluster according to the shape category of the traffic sign corresponding to each cluster, using the least squares principle, to obtain the extraction result of each traffic sign.
[0126] For example, if the shape category of a traffic sign is rectangle, the boundary relationships of the target point cloud in the cluster can be determined based on the top elevation value, bottom elevation value, left horizontal value, and right horizontal value corresponding to the cluster. Then, by fitting a rectangular traffic sign based on the boundary relationships, a vector file (ESRI Shapefile, Shp) format file result can be obtained. Shp format is a vector data format used to store Geographic Information System (GIS) data.
[0127] For example, if the shape category of the traffic sign is triangle, the positions of the three vertices of the target point cloud in the cluster can be determined based on the top elevation value, bottom elevation value, left horizontal value, and right horizontal value corresponding to the cluster. Then, by fitting the triangular traffic sign based on these three vertex positions, a Shp format file result can be obtained.
[0128] For example, if the traffic sign is circular, the center, radius, and angle between the circle and the spatial circle can be determined based on the edge characteristics of the target point cloud in the cluster, using a spatial circle fitting method. This allows for further fitting of the circular traffic sign. The formula for fitting a circle using the least squares principle is derived as follows:
[0129] In a two-dimensional plane coordinate system, the equation of a circle can generally be expressed as formula (3):
[0130] (x-x0) 2 +(y-y0) 2 =r 2 (3)
[0131] Where the center coordinates are (x0, y0), the radius is r, and (x, y) is any point on the circle; for the least squares method of circle fitting, the objective function for optimizing the squared error is shown in formula (4):
[0132]
[0133] Among them, (x i ,y i ) i=1,2,...,n represents the coordinates of the target point cloud on the arc; n represents the number of target point clouds participating in the fitting.
[0134] This application provides a traffic sign extraction method, which includes: collecting data from a target area to obtain image data, POS data, and point cloud data; the image data includes at least one traffic sign; using a traffic sign recognition model to recognize the image data to obtain a recognition result; the recognition result includes an image region corresponding to each traffic sign; determining the point cloud data corresponding to each image region in the recognition result based on the POS data, and clustering the point cloud data corresponding to each image region to obtain at least one cluster; each cluster includes multiple target point clouds; optimizing each cluster based on the measurement values of the multiple target point clouds, and extracting at least one traffic sign based on each optimized cluster; the measurement values include at least one of elevation and level values. As can be seen, in this embodiment of the application, after clustering the point cloud data corresponding to each image region, the elevation and / or horizontal values of the point cloud in each cluster are used to further optimize the clustering results, so that the traffic sign height and / or width information represented by the optimized clusters are closer to the traffic signs in the real scene. Based on the optimized clusters, the extraction of traffic signs can greatly reduce the deviation between the traffic sign extraction results and the real results, and effectively improve the accuracy of traffic sign extraction.
[0135] To better illustrate the purpose of this application, further explanation will be provided based on the above embodiments and in conjunction with specific scenarios.
[0136] Figure 5A This is a schematic diagram illustrating the result of traffic sign extraction before cluster optimization, as provided in an embodiment of this application. Figure 5B This is a schematic diagram illustrating the result of traffic sign extraction after cluster optimization, as provided in an embodiment of this application. Figure 5A and 5B As shown, the area enclosed by the bold black solid line is the region corresponding to the traffic sign extraction results. Figure 5A and Figure 5B The results of traffic sign extraction for circular, rectangular, and triangular traffic signs before and after cluster optimization are presented respectively; combined with Figure 5A and Figure 5B It can be seen that without optimization of the clusters, the traffic sign extraction results include not only the traffic sign area but also invalid areas such as the poles of the traffic sign, resulting in low extraction accuracy. Optimizing the clusters using horizontal and vertical elevation values can achieve more accurate extraction results for traffic signs of different shapes, thus improving extraction accuracy and making the results more consistent with actual traffic sign conditions. This addresses the problem of significant deviations between extracted and actual results in related technologies. Furthermore, the traffic sign extraction method provided in this application is applicable to various traffic sign shapes, not just traditional rectangular traffic signs. This improves extraction accuracy while meeting the requirements for extracting traffic signs of different shapes in complex scenarios. Moreover, although the traffic sign extraction method provided in this application uses a point cloud and deep learning-based automatic traffic sign extraction method, it has low sample requirements for model training, solving the problem of high training sample requirements and time demands in related technologies. This improves model training efficiency and, consequently, traffic sign extraction efficiency.
[0137] Figure 6 This is a schematic diagram of the composition of the traffic sign retrieval device provided in the embodiments of this application, as shown below. Figure 6 As shown, the device includes: a data acquisition module 300, an identification module 301, a clustering module 302, and an optimization module 303, wherein:
[0138] The acquisition module 300 is used to acquire data from the target area to obtain image data, POS data, and point cloud data; the image data includes at least one traffic sign.
[0139] The recognition module 301 is used to recognize the image data using a traffic sign recognition model to obtain a recognition result; the recognition result includes the image region corresponding to each traffic sign;
[0140] The clustering module 302 is used to determine the point cloud data corresponding to each image region in the recognition result based on the POS data, and to cluster the point cloud data corresponding to each image region to obtain at least one cluster; each cluster includes multiple target point clouds;
[0141] The optimization module 303 is used to optimize each cluster based on the measurement values of the plurality of target point clouds, and to extract the at least one traffic sign based on each optimized cluster; the measurement values include at least one of elevation value and level value.
[0142] In some embodiments, where the measured value includes the elevation value, the optimization module 303 is further configured to:
[0143] Based on the elevation values of the multiple target point clouds, the multiple target point clouds are sorted to obtain a first sequence;
[0144] Based on the first sequence, determine the top elevation value and bottom elevation value corresponding to each cluster;
[0145] Each cluster is optimized based on the top elevation value and the bottom elevation value.
[0146] In some embodiments, where the measured value includes the level value, the optimization module 303 is further configured to:
[0147] Based on the horizontal values of the multiple target point clouds, the multiple target point clouds are sorted to obtain a second sequence;
[0148] Based on the second sequence, determine the left-hand level value and the right-hand level value corresponding to each cluster;
[0149] Each cluster is optimized based on the left-hand level value and the right-hand level value.
[0150] In some embodiments, when the measured value includes the elevation value and the level value, the optimization module 303 is further configured to:
[0151] Based on the elevation values of the multiple target point clouds, the multiple target point clouds are sorted to obtain a third sequence;
[0152] Based on the third sequence, determine the top elevation value and bottom elevation value corresponding to each cluster;
[0153] Based on the horizontal values of the multiple target point clouds, the multiple target point clouds are sorted to obtain a fourth sequence;
[0154] Based on the fourth sequence, determine the left-hand level value and the right-hand level value corresponding to each cluster;
[0155] Each cluster is optimized based on the top elevation value, the bottom elevation value, the left horizontal value, and the right horizontal value.
[0156] In some embodiments, the optimization module 303 is further configured to:
[0157] Line segments are fitted to the elevation values of multiple target point clouds in the first sequence to obtain fitted line segments;
[0158] The curvature of the fitted line segment is calculated to obtain the maximum curvature and the minimum curvature;
[0159] The elevation value corresponding to the maximum curvature is determined as the top elevation value corresponding to each cluster, and the elevation value corresponding to the minimum curvature is determined as the bottom elevation value corresponding to each cluster.
[0160] In some embodiments, the apparatus further includes a filtering module, the filtering module being configured to:
[0161] According to a preset filtering threshold, each image region included in the recognition result is filtered to obtain the target recognition result; the target recognition result includes at least one image region.
[0162] The clustering module 302 is also used for:
[0163] Based on the POS data, the point cloud data corresponding to each image region in the target recognition result is determined.
[0164] In some embodiments, the apparatus further includes a training module, the training module being configured to:
[0165] Obtain a traffic sign dataset; the traffic sign dataset includes multiple traffic sign images containing traffic signs;
[0166] The corresponding border area of each traffic sign in each traffic sign image is filled with grayscale to obtain the corresponding label data.
[0167] A training dataset is constructed based on each traffic sign image and its corresponding label data;
[0168] The traffic sign recognition model is obtained by training the initial recognition model using the training dataset.
[0169] In practical applications, the above-mentioned acquisition module 300, identification module 301, clustering module 302, optimization module 303, filtering module and training module can all be implemented by a processor located in an electronic device. The processor can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller and microprocessor.
[0170] Furthermore, in this embodiment, the functional modules can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.
[0171] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to related technologies, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method of this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0172] Specifically, the computer program instructions corresponding to a traffic sign extraction method in this embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the computer program instructions corresponding to a traffic sign extraction method in the storage media are read or executed by an electronic device, any of the traffic sign extraction methods in the aforementioned embodiments can be implemented.
[0173] Based on the same technical concept as the foregoing embodiments, see Figure 7 It illustrates an electronic device 400 provided in an embodiment of this application, which may include: a memory 401 and a processor 402; wherein,
[0174] Memory 401 is used to store computer programs and data;
[0175] Processor 402 is configured to execute a computer program stored in memory to implement any of the traffic sign extraction methods described in the foregoing embodiments.
[0176] In practical applications, the memory 401 mentioned above can be volatile memory, such as RAM; or non-volatile memory, such as ROM, flash memory, hard disk drive (HDD) or solid-state drive (SSD); or a combination of the above types of memory, and provide instructions and data to the processor 402.
[0177] The processor 402 described above can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor. It is understood that for different traffic sign extraction devices, the electronic device used to implement the above processor function can also be other types, and this application embodiment does not specifically limit the specific types.
[0178] In some embodiments, the functions or modules of the apparatus provided in this application can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0179] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0180] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined to obtain new method embodiments without conflict.
[0181] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0182] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0183] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0184] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0185] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0186] The above are merely preferred embodiments of this application and are not intended to limit the scope of protection of this application.
Claims
1. A method for extracting traffic signs, characterized in that, The method includes: Data is collected from the target area to obtain image data, position and attitude system (POS) data, and point cloud data; the image data includes at least one traffic sign. The image data is identified using a traffic sign recognition model to obtain recognition results; the recognition results include the image region corresponding to each traffic sign. Based on the POS data, the point cloud data corresponding to each image region in the recognition result is determined, and the point cloud data corresponding to each image region is clustered to obtain at least one cluster; each cluster includes multiple target point clouds; Each cluster is optimized based on the measured values of the multiple target point clouds, and the extraction of at least one traffic sign is completed based on each optimized cluster; the measured values include elevation values. The optimization of each cluster based on the measurements of the multiple target point clouds includes: Based on the elevation values of the multiple target point clouds, the multiple target point clouds are sorted to obtain a first sequence; Line segments are fitted to the elevation values of multiple target point clouds in the first sequence to obtain fitted line segments; The curvature of the fitted line segment is calculated to obtain the maximum curvature and the minimum curvature; The elevation value corresponding to the maximum curvature is determined as the top elevation value corresponding to each cluster, and the elevation value corresponding to the minimum curvature is determined as the bottom elevation value corresponding to each cluster. Each cluster is optimized based on the top elevation value and the bottom elevation value.
2. The method according to claim 1, characterized in that, The measured values also include level values, and the optimization of each cluster based on the measured values of the plurality of target point clouds includes: Based on the elevation values of the multiple target point clouds, the multiple target point clouds are sorted to obtain a third sequence; Based on the third sequence, determine the top elevation value and bottom elevation value corresponding to each cluster; Based on the horizontal values of the multiple target point clouds, the multiple target point clouds are sorted to obtain a fourth sequence; Based on the fourth sequence, determine the left-hand level value and the right-hand level value corresponding to each cluster; Each cluster is optimized based on the top elevation value, the bottom elevation value, the left horizontal value, and the right horizontal value.
3. The method according to claim 1, characterized in that, The method further includes: According to a preset filtering threshold, each image region included in the recognition result is filtered to obtain the target recognition result; the target recognition result includes at least one image region. The step of determining the point cloud data corresponding to each image region in the recognition result based on the POS data includes: Based on the POS data, the point cloud data corresponding to each image region in the target recognition result is determined.
4. The method according to claim 1, characterized in that, The method further includes: Obtain a traffic sign dataset; the traffic sign dataset includes multiple traffic sign images containing traffic signs; The corresponding border area of each traffic sign in each traffic sign image is filled with grayscale to obtain the corresponding label data. A training dataset is constructed based on each traffic sign image and its corresponding label data; The traffic sign recognition model is obtained by training the initial recognition model using the training dataset.
5. A traffic sign retrieval device, characterized in that, The device includes: The data acquisition module is used to acquire data from the target area to obtain image data, POS data, and point cloud data; the image data includes at least one traffic sign. The recognition module is used to recognize the image data using a traffic sign recognition model to obtain recognition results; the recognition results include the image region corresponding to each traffic sign. The clustering module is used to determine the point cloud data corresponding to each image region in the recognition result based on the POS data, and to cluster the point cloud data corresponding to each image region to obtain at least one cluster; each cluster includes multiple target point clouds; An optimization module is used to optimize each cluster based on the measurement values of the multiple target point clouds, and to extract the at least one traffic sign based on each optimized cluster; the measurement values include elevation values; The optimization module is further configured to: sort the multiple target point clouds according to their elevation values to obtain a first sequence; perform line segment fitting on the elevation values of the multiple target point clouds in the first sequence to obtain fitted line segments; calculate the curvature of the fitted line segments to obtain the maximum curvature and the minimum curvature; determine the elevation value corresponding to the maximum curvature as the top elevation value corresponding to each cluster, and determine the elevation value corresponding to the minimum curvature as the bottom elevation value corresponding to each cluster; and optimize each cluster according to the top elevation value and the bottom elevation value.
6. An electronic device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method according to any one of claims 1 to 4.
7. A computer storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the method described in any one of claims 1 to 4.
Citation Information
Patent Citations
Method and device for extraction of rod-shaped ground object
CN105701478A
