Speed bump identification method, device, storage medium and vehicle
By processing and fusion of the original speed bump recognition results of the target image, the chromatic aberration and error problems in speed bump recognition are solved, the accuracy of the recognition results is improved, and the accurate adjustment of the vehicle is ensured.
Patent Information
- Application Number
- CN202410227536.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-28
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-02-28
AI Technical Summary
In the prior art, there are chromatic aberrations and identification errors in speed bump identification, which leads to the inability to accurately adjust the vehicle and affects the user's driving experience.
By further processing the original speed bump recognition results recognized by the target image, the corresponding set of original line segments on the lower edge is determined, and the target line segment set is fused according to the preset fusion conditions, thereby determining the target speed bump recognition results. The results of the same speed bump are fused together.
The accuracy of speed bump identification results is improved, and the problem of identifying one speed bump as multiple speed bumps is avoided, which enhances the accuracy of the recognition.
Smart Images

Figure CN118262312B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to a speed bump recognition method, device, storage medium and vehicle. Background Art
[0002] In the related art, due to problems such as color difference and recognition error of speed bumps, the speed bump recognition results may be inaccurate. For example, a speed bump may be recognized as multiple separate speed bumps, resulting in the inability to accurately adjust the vehicle, affecting the user's driving experience. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a speed bump recognition method, device, storage medium and vehicle, which further processes the original speed bump recognition result obtained by identifying the target image, determines the original line segment set corresponding to the lower edge of the speed bump, and fuses the original line segment set according to preset fusion conditions to obtain a target line segment set, and then determines the target speed bump recognition result according to the target line segments in the target line segment set, so that the speed bump recognition results belonging to the same speed bump can be fused together, thereby solving the problem of identifying one speed bump as multiple separate speed bumps, and improving the accuracy of the speed bump recognition result obtained.
[0004] According to a first aspect of an embodiment of the present disclosure, a speed bump identification method is provided, comprising:
[0005] Obtain the original speed bump recognition result corresponding to the target image;
[0006] Determine, according to the original speed bump recognition result, an original line segment set corresponding to the lower edge of the speed bump;
[0007] According to a preset fusion condition, the original line segment set is fused to obtain a target line segment set, wherein the target line segment set includes at least one target line segment;
[0008] A target speed bump recognition result is obtained according to the position of the target line segments in the target line segment set in the target image, and the number of speed bumps corresponding to the target speed bump recognition result is less than or equal to the number of speed bumps corresponding to the original speed bump recognition result.
[0009] Optionally, fusing the original line segment set according to a preset fusion condition to obtain a target line segment set includes:
[0010] According to the preset fusion condition, determining a similar cluster corresponding to each line segment in the original line segment set to obtain a plurality of initial similar clusters;
[0011] Establishing an association relationship between any two original similar clusters including the same line segment among the multiple original similar clusters;
[0012] Classifying the multiple original similar clusters according to the association relationship to obtain at least one target similar cluster;
[0013] The line segments in the at least one target homogeneous cluster are fused respectively to obtain the target line segment set, wherein the line segments in one target homogeneous cluster are fused to obtain one target line segment in the target line segment set.
[0014] Optionally, determining the same type cluster corresponding to each line segment in the original line segment set according to the preset fusion condition includes:
[0015] For any line segment in the original line segment set, the line segment is combined with the remaining line segments in the original line segment set to obtain a plurality of original line segment groups corresponding to the line segment;
[0016] For any original line segment group corresponding to the line segment, if the original line segment group meets the preset fusion condition, determine the original line segment group as the target line segment group of the line segment;
[0017] The line segments corresponding to all target line segment groups of the line segment are determined as the same type clusters corresponding to the line segment.
[0018] Optionally, the method further comprises:
[0019] For any original line segment group corresponding to the line segment, determine the angle difference, mapping length difference and intercept of two line segments in the original line segment group, wherein the mapping length difference is the absolute value of the difference between the mapping length of the two line segments and the total length of the two line segments, and the mapping length is the line segment length obtained by mapping the shorter line segment of the two line segments to the longer line segment;
[0020] When the angle difference between two line segments in the original line segment group is less than a preset angle threshold, the mapping length difference is less than a preset length threshold, and the intercept is less than a preset intercept threshold, it is determined that the original line segment group meets the preset fusion condition.
[0021] Optionally, the obtaining of an original speed bump recognition result corresponding to the target image includes:
[0022] Acquire the target image, where the target image is a road image;
[0023] The target image is processed by a target recognition model to obtain an initial speed bump recognition result and an offset value, wherein the target recognition model is obtained by training a basic model with multiple sample images carrying annotated labels, and the annotated label of each sample image includes sub-offset values and actual speed bump blocks corresponding to multiple image blocks constituting the sample image;
[0024] The original speed bump recognition result is obtained according to the initial speed bump recognition result and the offset value.
[0025] Optionally, determining the original line segment set corresponding to the lower edge of the speed bump according to the original speed bump recognition result includes:
[0026] Determining, according to the original speed bump recognition result, a plurality of feature points corresponding to the lower edge of the speed bump;
[0027] The feature points of different speed bumps corresponding to the original speed bump recognition results are connected in sequence to obtain an original line segment set corresponding to the lower edge of the speed bump.
[0028] Optionally, before determining the original line segment set corresponding to the lower edge of the speed bump according to the original speed bump recognition result, the method further includes:
[0029] Correcting the original speed bump recognition result according to fixed parameters of the camera to obtain a corrected recognition result, wherein the fixed parameters include an intrinsic parameter matrix and a distortion parameter;
[0030] The determining, according to the original speed bump recognition result, an original line segment set corresponding to the lower edge of the speed bump comprises:
[0031] According to the corrected recognition result, an original line segment set corresponding to the lower edge of the speed bump is determined.
[0032] According to a second aspect of an embodiment of the present disclosure, there is provided a speed bump identification device, comprising:
[0033] An acquisition module is configured to acquire an original speed bump recognition result corresponding to the target image;
[0034] A first determination module is configured to determine an original line segment set corresponding to a lower edge of the speed bump according to the original speed bump recognition result;
[0035] A first obtaining module is configured to fuse the original line segment set according to a preset fusion condition to obtain a target line segment set, wherein the target line segment set includes at least one target line segment;
[0036] The second acquisition module is configured to obtain a target speed bump recognition result according to the position of the target line segment in the target line segment set in the target image, wherein the number of speed bumps corresponding to the target speed bump recognition result is less than or equal to the number of speed bumps corresponding to the original speed bump recognition result.
[0037] According to a third aspect of an embodiment of the present disclosure, there is provided a speed bump identification device, comprising:
[0038] processor;
[0039] a memory for storing processor-executable instructions;
[0040] The processor is configured to implement the steps of the speed bump identification method provided in the first aspect of the present disclosure when executing.
[0041] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the speed bump identification method provided in the first aspect of the present disclosure are implemented.
[0042] According to a fifth aspect of an embodiment of the present disclosure, a vehicle is provided, comprising the speed bump identification device provided by the third aspect of the present disclosure.
[0043] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0044] By continuing to process the original speed bump recognition results obtained by identifying the target image, the original line segment set corresponding to the lower edge of the speed bump is determined, and the original line segment set is fused according to preset fusion conditions to obtain the target line segment set, and then the target speed bump recognition result is determined according to the target line segments in the target line segment set, so that the speed bump recognition results belonging to the same speed bump can be fused together, solving the problem of identifying one speed bump as multiple separate speed bumps, so as to improve the accuracy of the identified speed bump recognition results.
[0045] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0047] Figure 1 The figure is a schematic diagram of a speed bump recognition method according to an exemplary embodiment.
[0048] Figure 2 The figure is a flow chart of a speed bump identification method according to an exemplary embodiment.
[0049] Figure 3 The figure is a flow chart of a method for fusing an original line segment set according to an exemplary embodiment.
[0050] Figure 4 The figure is a flowchart of a method for classifying homogeneous clusters according to an exemplary embodiment.
[0051] Figure 5The figure is a flow chart of another speed bump identification method according to an exemplary embodiment.
[0052] Figure 6 The figure is a block diagram of a speed bump identification device according to an exemplary embodiment.
[0053] Figure 7 is a block diagram of a vehicle according to an exemplary embodiment. DETAILED DESCRIPTION
[0054] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0055] It should be noted that all actions of acquiring signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.
[0056] Figure 1 is a schematic diagram of a speed bump recognition method according to an exemplary embodiment. Figure 2 is a flow chart of a speed bump identification method according to an exemplary embodiment. Figure 1 and Figure 2 As shown, the method may include the following steps.
[0057] In step S201, the original speed bump recognition result corresponding to the target image is obtained.
[0058] In this embodiment, the original speed bump recognition result obtained after speed bump recognition of the target image can be obtained, so that the original speed bump recognition result can be further processed on the basis of the original speed bump recognition result to obtain a more accurate speed bump recognition result. The original speed bump recognition result can be obtained by processing the target image with a pre-trained speed bump recognition model based on deep learning, or by processing the target image with other image recognition methods.
[0059] In step S202, according to the original speed bump recognition result, an original line segment set corresponding to the lower edge of the speed bump is determined.
[0060] In this embodiment, the original speed bump recognition result may include the outline of at least one speed bump that is recognized. According to the outline of the speed bump in the original speed bump recognition result, the lower edge of the outline of each speed bump may be determined, and the lower edge is an edge of the outline of the speed bump that is close to the target vehicle. And according to the lower edge of the outline of each speed bump, the original line segment set corresponding to the lower edge of the speed bump is obtained. Among them, the lower edge of the outline of a speed bump recognized in the original speed bump recognition result corresponds to at least one line segment in the original line segment set.
[0061] In step S203, the original line segment set is fused according to a preset fusion condition to obtain a target line segment set, which includes at least one target line segment.
[0062] In this embodiment, the preset fusion condition is used to classify the line segments in the target line segment set that belong to the same speed bump, and the multiple line segments in the original line segment set can be classified and fused according to the preset fusion condition. Specifically, the line segments in the original line segment set that meet the preset fusion condition can be fused respectively, so that the line segments in the target line segment set that belong to the same speed bump are fused into one target line segment, thereby obtaining a target line segment set.
[0063] In step S204, a target speed bump recognition result is obtained according to the position of the target line segment in the target line segment set in the target image, and the number of speed bumps corresponding to the target speed bump recognition result is less than or equal to the number of speed bumps corresponding to the original speed bump recognition result.
[0064] In this embodiment, after obtaining the target line segment set, the target speed bump recognition result can be determined based on the target line segments in the target line segment set. Specifically, the coordinates of the target line segment in the image coordinate system can be determined based on the position of the target line segment in the target image, and converted into coordinates in the vehicle coordinate system corresponding to the target vehicle, thereby obtaining the target speed bump recognition result. The target speed bump recognition result may include the position of the speed bump, the distance between the speed bump and the target vehicle, and the length of the speed bump. Among them, the width and height of the speed bump can be a preset height and preset width, and the preset height and preset width can be set according to actual conditions, and each target line segment corresponds to a speed bump. Figure 1 In the figure, 101, 102 and 103 are the speed bumps identified by the original speed bump recognition result, and 104 and 105 are the speed bumps identified by the target speed bump recognition result. Parts belonging to the same speed bump are identified as two speed bumps 101 and 102. By further processing the original speed bump recognition result, 101 and 102 are merged into a speed bump 104, making the speed bump recognition result more accurate.
[0065] In this embodiment, the original speed bump recognition result obtained by the target image recognition is further processed to determine the original line segment set corresponding to the lower edge of the speed bump, and the original line segment set is fused according to the preset fusion condition to obtain the target line segment set, and then the target speed bump recognition result is determined according to the target line segment in the target line segment set. In this way, the speed bump recognition results belonging to the same speed bump can be fused together, solving the problem of identifying one speed bump as multiple separate speed bumps, so as to improve the accuracy of the speed bump recognition result obtained.
[0066] Figure 3 is a flow chart showing a method for fusing an original line segment set according to an exemplary embodiment. Figure 3 As shown, in a possible implementation manner, according to a preset fusion condition, the original line segment set is fused to obtain a target line segment set, which may include the following steps:
[0067] In step S301 , according to a preset fusion condition, a similar cluster corresponding to each line segment in the original line segment set is determined to obtain a plurality of original similar clusters.
[0068] In this embodiment, for any line segment in the original line segment set, it can be determined according to the preset fusion condition whether the other line segments remaining in the original line segment set meet the preset fusion condition with the any line segment. If there is any other line segment that meets the preset fusion condition, it is determined that the any other line segment and the any line segment belong to the same cluster. By traversing all the line segments in the original line segment set, the cluster corresponding to each line segment in the original line segment set can be determined, thereby obtaining multiple original clusters. Among them, a cluster may have only one line segment, that is, for the cluster, no other line segment meets the preset fusion condition with the line segments in the cluster.
[0069] In step S302, an association relationship is established between any two original homogeneous clusters including the same line segment among the plurality of original homogeneous clusters.
[0070] In this embodiment, multiple original homogeneous clusters can be traversed to determine whether there are identical line segments in any two original homogeneous clusters. If there are identical line segments, any two original homogeneous clusters including the identical line segments are associated.
[0071] In step S303, multiple original homogeneous clusters are classified according to the association relationship to obtain at least one target homogeneous cluster.
[0072] In this embodiment, all original similar clusters with association relationships can be classified into one category according to the association relationship, that is, merged into a target similar cluster, and original similar clusters without association relationships can be a single target similar cluster, thereby classifying to obtain at least one target similar cluster.
[0073] In step S304, line segments in at least one target homogeneous cluster are fused respectively to obtain a target line segment set, wherein line segments in one target homogeneous cluster are fused to obtain a target line segment in the target line segment set.
[0074] In this embodiment, for each target homogeneous cluster, the line segments belonging to the same target homogeneous cluster can be fused, and the line segments in one target homogeneous cluster are fused to obtain a target line segment, thereby obtaining a target line segment set. The line segments in one target homogeneous cluster belong to the same speed bump, that is, one target line segment corresponds to one speed bump.
[0075] Figure 4 is a flow chart of a method for classifying homogeneous clusters according to an exemplary embodiment. Figure 4 As shown, in a possible implementation manner, determining the same type cluster corresponding to each line segment in the original line segment set according to the preset fusion condition may include the following steps:
[0076] In step S401, for any line segment in the original line segment set, the line segment is combined with the remaining line segments in the original line segment set to obtain a plurality of original line segment groups corresponding to the line segment.
[0077] In this embodiment, each line segment in the original line segment set can be traversed, and the corresponding similar cluster can be found for each line segment. Any line segment can be combined with the remaining line segments in the original line segment set to obtain multiple original line segment groups corresponding to the line segment, each original line segment group includes the line segment and one line segment in the remaining line segments in the original line segment set.
[0078] In step S402, for any original line segment group corresponding to the line segment, if the original line segment group meets a preset fusion condition, the original line segment group is determined as a target line segment group of the line segment.
[0079] In this embodiment, for the multiple original line segment groups corresponding to the line segment, it can be determined whether each original line segment group meets the preset fusion condition. If any original line segment group meets the preset fusion condition, the original line segment group is determined as the target line segment group of the line segment.
[0080] In step S403, the line segments corresponding to all target line segment groups of the line segment are determined as the same type clusters corresponding to the line segment.
[0081] In this embodiment, the target segment group corresponding to the line segment includes the line segment and another line segment that meets the preset fusion condition with the line segment, and the line segments corresponding to all the target segment groups of the line segment can be determined as the same type cluster corresponding to the line segment. The line segments in the same type cluster corresponding to the line segment can be deduplicated line segments.
[0082] In a possible implementation, a method for determining whether the original line segment group satisfies a preset fusion condition may be as follows: for any original line segment group corresponding to the line segment, determining the angle difference, mapping length difference and intercept of two line segments in the original line segment group, wherein the mapping length difference is the absolute value of the difference between the mapping lengths of the two line segments and the total lengths of the two line segments, and the mapping length is the length of the line segment obtained by mapping the shorter of the two line segments to the longer line segment; when the angle difference between the two line segments in the original line segment group is less than a preset angle threshold, the mapping length difference is less than a preset length threshold, and the intercept is less than a preset intercept threshold, it is determined that the original line segment group satisfies the preset fusion condition.
[0083] In this embodiment, for any original line segment group corresponding to the line segment, the angle and length of two line segments in the original line segment group can be determined. Among them, the angle of the line segment can be the angle between the line segment and the X-axis in the image coordinate system. And the angle difference between the two line segments in the original line segment group is determined by the angle of the two line segments. The intercept of the two line segments is the distance between the two line segments. The method for calculating the difference in the mapped length of the two line segments can be: first map the shorter line segment of the two line segments to the longer line segment to obtain the mapped line segment, and then determine the length of the mapped line segment to obtain the mapped length, and then determine the sum of the original lengths of the two line segments to obtain the total length of the two line segments, and determine the absolute value of the difference between the total length of the two line segments and the mapped length as the mapped length difference of the two line segments. The method of mapping the shorter line segment to the longer line segment to obtain the mapped line segment is as follows: draw a perpendicular line through the two endpoints of the shorter line segment to the longer line segment to obtain two perpendicular foot points, and determine the longest line segment composed of the two perpendicular foot points and the two endpoints of the longer line segment as the mapped line segment. When the angle difference between the two line segments in the original line segment group is less than the preset angle threshold, the mapping length difference is less than the preset length threshold, and the intercept is less than the preset intercept threshold, it is determined that the original line segment group meets the preset fusion condition. The preset angle threshold, the preset length threshold, and the preset intercept threshold can all be set according to actual conditions.
[0084] In a possible implementation, a method for obtaining an original speed bump recognition result corresponding to a target image may be: obtaining a target image, which is a road image; processing the target image through a target recognition model to obtain an initial speed bump recognition result and an offset value, wherein the target recognition model is obtained by training a basic model with multiple sample images carrying annotated labels, and the annotated labels of each sample image include sub-offset values and actual speed bump blocks corresponding to multiple image blocks constituting the sample image; and obtaining a target speed bump recognition result based on the initial speed bump recognition result and the offset value.
[0085] In this embodiment, a target image can be obtained, and the target image can be a road image collected by a sensor. The sensor can be set on a vehicle, or the sensor can be set on a drone, or the sensor can be set on a roadside fixed device. In order to collect road images in real time through the sensor, the target image can be obtained, so as to identify the speed bump on the target image.
[0086] The target recognition model can be obtained by training the basic model in advance through a plurality of sample images with annotated labels, and the target image can be recognized by the target recognition model, so as to recognize the speed bump in the target image as the target, and obtain the initial speed bump recognition result and the offset value. The initial speed bump recognition result can be the probability that each pixel in the target image is a pixel constituting the actual speed bump, and then the pixels included in the predicted speed bump can be determined by the probability. The offset value represents the difference between the position of the actual speed bump and the position of the predicted speed bump corresponding to the initial speed bump recognition result, and can be used to correct the initial speed bump recognition result so as to obtain a more accurate speed bump recognition result. Each sample image can be divided into a plurality of image blocks, and each image block obtained by the division can be recognized, and according to the actual speed bump of the sample image, the sub-offset value corresponding to each image block and the actual speed bump block corresponding to the image block can be obtained. The actual speed bump block is the part of the actual speed bump in the image block, that is, the actual speed bump blocks corresponding to the plurality of image blocks can constitute the actual speed bump corresponding to the sample image.
[0087] The predicted speed bump can be determined based on the initial speed bump recognition result, and the predicted speed bump can be corrected based on the offset value to obtain a more accurate target speed bump recognition result.
[0088] In this embodiment, the target image is processed by training a target recognition model with multiple sample images carrying annotation labels including sub-offset values corresponding to multiple image blocks constituting the sample image and actual speed bump blocks. The initial speed bump recognition result and the offset value can be identified, and the initial speed bump recognition result can be corrected by the offset value, so as to obtain a more accurate speed bump recognition result and improve the recognition effect of the speed bump.
[0089] In a possible implementation, the target recognition model can be trained by the following steps:
[0090] Acquire multiple sample images with annotated labels; perform multiple rounds of iterative training on the basic model based on the multiple sample images with annotated labels; after each round of iterative training, obtain the predicted speed bump recognition result and predicted offset value output by the current round of iterative training; obtain the offset value loss and speed bump loss corresponding to the current round of iterative training based on the predicted speed bump recognition result and predicted offset value output by the current round of iterative training and the annotated labels of the sample images in the current round of iterative training; optimize the basic model based on the offset value loss and speed bump loss corresponding to the current round of iterative training; stop training when the basic model meets the preset conditions to obtain the target recognition model.
[0091] In this embodiment, the sample images may be labeled first so as to obtain a plurality of sample images carrying the labeled labels. Among them, the sample images carrying the labeled labels may be obtained by re-labeling the pre-labeled sample images. The predicted speed bump recognition result may be the probability that each pixel point in the predicted sample image is a pixel point constituting the actual speed bump, and the predicted offset value is the difference between the predicted position of the actual speed bump and the predicted position of the speed bump corresponding to the predicted speed bump recognition result. The speed bump loss may be determined based on the predicted speed bump recognition result and the actual speed bump blocks corresponding to the multiple image blocks constituting the sample images in the labeled labels; and the offset value loss may be obtained based on the predicted offset value and the sub-offset value corresponding to the multiple image blocks constituting the sample images in the labeled labels. Specifically, the calculation methods of the offset value loss and the speed bump loss may both be obtained by distance calculation.
[0092] After each round of iterative training is completed and the offset loss and speed bump loss corresponding to the iterative training are obtained, the parameters in the basic model can be optimized by calculation methods such as the gradient descent method to obtain the optimized basic model. In the next round of iterative training, the model optimized in this round of iteration is trained. In the process of multiple rounds of iterative training of the basic model, the data of the iterative training can be counted. For example, the preset condition can be that the basic model converges, or the number of training rounds reaches a preset number of rounds. For example, the preset number of rounds can be 400. When the basic model converges or the number of training rounds reaches the preset number of rounds, the training can be stopped, and the trained basic model can be determined as the target recognition model.
[0093] In a possible implementation, the method for obtaining multiple sample images carrying annotated labels may include the following steps: obtaining multiple sample images after pre-annotating actual speed bumps; for any sample image among the multiple sample images after pre-annotating actual speed bumps, segmenting the sample image to obtain multiple image blocks constituting the sample image; determining a sub-offset value and an actual speed bump block corresponding to each image block constituting the sample image; re-annotating the sample image according to the sub-offset value and the actual speed bump block corresponding to each image block constituting the sample image; and determining the multiple sample images after the re-annotation as multiple sample images carrying annotated labels.
[0094] In this embodiment, a plurality of sample images after pre-labeling of actual speed bumps may be acquired in advance. The pre-labeling of the sample images may be completed by manual labeling, or may be completed based on manual and computer cooperation. Then, for each pre-labeled sample image, the sample image may be segmented to obtain a plurality of image blocks constituting the sample image. Then, for each image block, the sub-offset value and the actual speed bump block of the image block may be determined. After obtaining the sub-offset value and the actual speed bump block corresponding to each image block, the sub-offset value and the actual speed bump block corresponding to the image block may be determined as the label of the image block, and the image block may be re-labeled to obtain a sample image carrying the labeled label.
[0095] In a possible implementation, a method for obtaining a plurality of sample images pre-labeled for actual speed bumps may be:
[0096] Acquire multiple original sample images, where the original sample images are images acquired by the vehicle including actual speed bumps; for any original sample image, pre-label the original sample image according to the position of the actual speed bump in the original sample image, and obtain a sample image corresponding to the original sample image after pre-labeling the actual speed bump; determine the multiple original sample images after pre-labeling as multiple sample images after pre-labeling the actual speed bump.
[0097] In this embodiment, multiple original sample images with known actual speed bump locations can be obtained. The actual speed bump locations can be input manually. After obtaining the actual speed bump locations, the original sample images can be pre-labeled according to the actual speed bump locations, so as to obtain multiple sample images with pre-labeled actual speed bumps.
[0098] In a possible implementation manner, a method for determining the sub-offset value and the actual speed bump block corresponding to each image block constituting the sample image may be:
[0099] According to the position of the actual speed bump in the pre-marked sample image, the corresponding target pixel point in each image block constituting the sample image is determined, and the target pixel point is the pixel point constituting the actual speed bump; according to the pixel coordinates and number of the corresponding target pixel points in each image block, the sub-offset value and the actual speed bump block corresponding to each image block constituting the sample image are determined.
[0100] In this embodiment, the method for determining the sub-offset value of each image block may be: determining the number of pixels and pixel coordinates of the target pixel points corresponding to the pre-marked actual speed bump in the image block, and then determining the sub-offset value corresponding to the image block through the number of pixels and pixel coordinates of the target pixel points corresponding to the image block. Specifically, the cumulative sum of the coordinates of the target pixels corresponding to the pixel block may be determined based on the pixel coordinates of the target pixel points corresponding to the image block, and the value corresponding to each coordinate axis in the cumulative sum of the coordinates may be divided by the number of pixels to obtain the sub-offset value corresponding to the image block. The actual speed bump block corresponding to the image block may be the portion of the image block corresponding to the pre-marked actual speed bump.
[0101] In a possible implementation, the initial speed bump recognition result may include a probability that each pixel in the target image is a pixel constituting an actual speed bump;
[0102] According to the initial speed bump recognition result and the offset value, the target speed bump recognition result is obtained, which may include:
[0103] According to the preset probability threshold, the initial speed bump recognition result is binarized to obtain a mask image; the mask image is subjected to edge detection for the speed bump to obtain the speed bump contour; the speed bump contour is corrected by the offset value to obtain the target contour; and the target speed bump recognition result is obtained according to the target contour.
[0104] In this embodiment, the initial speed bump recognition result can be divided according to a preset probability threshold so as to binarize the initial speed bump recognition result. The preset probability threshold can be set according to the actual situation. For example, the preset probability threshold can be 80%, that is, for the probability corresponding to each pixel in the initial speed bump recognition result, if it is greater than or equal to the preset probability threshold, the value of the pixel is set to 1, and if it is less than the preset probability threshold, the value of the pixel is set to 0, thereby obtaining a mask image. The portion where the pixel value is 1 is a speed bump, and for the speed bump in the mask image, edge detection is performed on the speed bump. Specifically, edge detection can be performed using the Sobel operator to obtain the speed bump contour. After obtaining the speed bump contour, the speed bump contour can be corrected according to the offset value. That is, the speed bump contour can be moved as a whole according to the value corresponding to each coordinate axis in the offset value to obtain the target contour; or, the coordinates of each pixel corresponding to the speed bump contour can be offset respectively to obtain new pixel coordinates, thereby determining the new pixel, and determining the speed bump contour corresponding to the new pixel as the target contour. Specifically, based on the offset value, the least square method can be used to perform edge regression on the speed bump contour to obtain the target contour. The target contour is the contour in the target image. Based on the position of the target contour in the target image, that is, the coordinates of the target contour in the coordinate system of the target image, it can be converted to the vehicle coordinates in the vehicle coordinate system, and then the position of the identified speed bump relative to the vehicle can be obtained. Including the size, length, height of the speed bump and the distance between the speed bump and the vehicle, etc., so as to obtain the target speed bump recognition result, and the target speed bump recognition result can also include the target contour. So as to adjust the vehicle according to the target speed bump recognition result, for example, adjust the parameters such as the air suspension system and torque of the vehicle. Through this method, the slender speed bump can be better identified, and the contour of the curved and deformed speed bump can be more closely identified, thereby breaking the recognition method of using a rectangular rotating frame for speed bump matching and obtaining a better speed bump recognition effect.
[0105] In a possible implementation manner, before correcting the speed bump contour by using the offset value to obtain the target contour, the method further includes: determining the number of pixels included in each speed bump contour;
[0106] The speed bump contours with the number of pixels greater than or equal to the preset pixel threshold are determined as candidate contours.
[0107] In this embodiment, in order to improve the recognition accuracy of speed bumps, for each speed bump contour, the number of pixels included in each speed bump contour is determined, and the speed bump contour with a pixel number greater than or equal to a preset pixel threshold is determined as a candidate contour.
[0108] After obtaining the candidate contour, the speed bump contour is corrected by using the offset value to obtain the target contour, including: correcting the candidate contour by using the offset value to obtain the target contour.
[0109] In this embodiment, the target contour is obtained by correcting the candidate contour by the offset value, and the misidentified speed bumps with a small number of pixels can be deleted from the speed bump contour, so that the obtained target contour is more accurate. Among them, the preset pixel threshold can be set according to the actual situation.
[0110] In a possible implementation, determining an original set of line segments corresponding to the lower edge of the speed bump based on the original speed bump recognition result may include: determining multiple feature points corresponding to the lower edge of the speed bump based on the original speed bump recognition result; and sequentially connecting the feature points of different speed bumps corresponding to the original speed bump recognition results to obtain an original set of line segments corresponding to the lower edge of the speed bump.
[0111] In this embodiment, according to the speed bump contour obtained in the original speed bump recognition result, the lower edge of the speed bump on the side of the speed bump contour close to the target vehicle is determined, and according to the lower edge of the speed bump, a plurality of feature points located on the lower edge of the speed bump are determined. Among them, all the pixel points included in the lower edge of the speed bump can be determined as feature points, and some of the pixel points included in the lower edge of the speed bump can also be taken as feature points. Then, for any speed bump corresponding to the original speed bump recognition result, the feature points corresponding to the speed bump are connected in sequence to obtain multiple line segments, and the line segments obtained by connecting the feature points corresponding to all speed bumps are determined as the original line segment set of the lower edge of the speed bump.
[0112] In a possible implementation, before determining the original line segment set corresponding to the lower edge of the speed bump according to the original speed bump recognition result, the original speed bump recognition result may be corrected first, and the original speed bump recognition result may be corrected according to the fixed parameters of the camera to obtain a corrected recognition result. The fixed parameters may include an internal parameter matrix and a distortion parameter. Then, according to the corrected recognition result, the original line segment set corresponding to the lower edge of the speed bump is determined. This is to eliminate the interference of the camera distortion on the speed bump recognition result.
[0113] Figure 5 is a flow chart showing another method for identifying a speed bump according to an exemplary embodiment. Figure 5 As shown, the following steps are included:
[0114] In step S501, an original speed bump recognition result is obtained, wherein the original speed bump recognition model can be obtained by processing the target image with a pre-trained speed bump recognition model based on deep learning, or by processing the target image with other image recognition methods.
[0115] In step S502, the original speed bump recognition result is corrected. The original speed bump recognition result can be corrected by using the camera's internal parameter matrix and distortion parameters to remove the camera's distortion and obtain a corrected recognition result.
[0116] In step S503, the lower edge feature points are extracted and connected to obtain a target line segment set. The lower edge feature points of the speed bump contour in the corrected recognition result are extracted, and the feature points of each speed bump are connected to obtain a target line segment set.
[0117] In step S504, the angles of the line segments are matched. For the line segments in the target line segment set, the angles of the line segments are matched to obtain angle differences.
[0118] In step S505, each line segment is mapped and fused. Line segment mapping and fusion are performed on the line segments in the target line segment set to obtain the mapping length differences between the line segments.
[0119] In step S506, the intercepts between the line segments are calculated. For the line segments in the target line segment set, the intercepts between the line segments are calculated.
[0120] In step S507, it is determined whether it belongs to the same cluster. According to the angle difference between the line segments, the mapping length difference and the intercept between the line segments, it is determined whether it belongs to the same cluster according to the preset fusion conditions. If it belongs to the same cluster, step S508 is executed; if it does not belong to the same cluster, step S509 is executed.
[0121] In step S508, new line segments are obtained by merging line segments belonging to the same cluster.
[0122] In step S509, the old line segments are used, and the line segments that do not belong to the same cluster are retained separately.
[0123] In step S510, 2D coordinates are converted to 3D coordinates. The fused new line segment or the retained old line segment is transformed from 2D coordinates of the image coordinate system to 3D coordinates of the vehicle coordinate system, wherein 2D coordinates are two-dimensional coordinates and 3D coordinates are three-dimensional coordinates.
[0124] In step S511, the speed bump position is determined by using the transformed line segment coordinates.
[0125] In step S512, the target vehicle is controlled and adjusted. The target vehicle is adjusted by controlling the position of the speed bump. Specifically, the air suspension system of the vehicle and the vehicle torque can be adjusted.
[0126] Figure 6 is a block diagram of a speed bump identification device according to an exemplary embodiment. Figure 6The speed bump identification device 600 includes an acquisition module 601 , a first determination module 602 , a first acquisition module 603 and a second acquisition module 604 .
[0127] An acquisition module 601 is configured to acquire an original speed bump recognition result corresponding to a target image;
[0128] A first determination module 602 is configured to determine an original line segment set corresponding to a lower edge of the speed bump according to the original speed bump recognition result;
[0129] A first obtaining module 603 is configured to fuse the original line segment set according to a preset fusion condition to obtain a target line segment set, wherein the target line segment set includes at least one target line segment;
[0130] The second acquisition module 604 is configured to obtain a target speed bump recognition result according to the position of the target line segment in the target line segment set in the target image, wherein the number of speed bumps corresponding to the target speed bump recognition result is less than or equal to the number of speed bumps corresponding to the original speed bump recognition result.
[0131] Optionally, the first obtaining module 603 includes:
[0132] A first determining submodule is configured to determine a similar cluster corresponding to each line segment in the original line segment set according to the preset fusion condition, to obtain a plurality of original similar clusters;
[0133] an association submodule, configured to establish an association relationship between any two original homogeneous clusters including the same line segment among the plurality of original homogeneous clusters;
[0134] A classification submodule is configured to classify the multiple original homogeneous clusters according to the association relationship to obtain at least one target homogeneous cluster;
[0135] The fusion submodule is configured to fuse the line segments in the at least one target homogeneous cluster respectively to obtain the target line segment set, wherein the line segments in one target homogeneous cluster are fused to obtain one target line segment in the target line segment set.
[0136] Optionally, the first determining submodule includes:
[0137] a combining unit configured to combine, for any line segment in the original line segment set, the line segment with the remaining line segments in the original line segment set, respectively, to obtain a plurality of original line segment groups corresponding to the line segment;
[0138] A first determining unit is configured to, for any original line segment group corresponding to the line segment, determine the original line segment group as a target line segment group for the line segment if the original line segment group meets the preset fusion condition;
[0139] The second determining unit is configured to determine the line segments corresponding to all target line segment groups of the line segment as the same type cluster corresponding to the line segment.
[0140] Optionally, the speed bump identification device 600 further includes:
[0141] A second determination module is configured to determine, for any original line segment group corresponding to the line segment, an angle difference, a mapping length difference and an intercept of two line segments in the original line segment group, wherein the mapping length difference is an absolute value of a difference between a mapping length of the two line segments and a total length of the two line segments, and the mapping length is a line segment length obtained by mapping the shorter line segment of the two line segments to the longer line segment;
[0142] The third determination module is configured to determine that the original line segment group meets the preset fusion condition when the angle difference between two line segments in the original line segment group is less than a preset angle threshold, the mapping length difference is less than a preset length threshold, and the intercept is less than a preset intercept threshold.
[0143] Optionally, the acquisition module 601 includes:
[0144] An acquisition submodule is configured to acquire the target image, where the target image is a road image;
[0145] A first obtaining submodule is configured to process the target image through a target recognition model to obtain an initial speed bump recognition result and an offset value, wherein the target recognition model is obtained by training a basic model with a plurality of sample images carrying annotated labels, and the annotated label of each sample image includes a sub-offset value corresponding to a plurality of image blocks constituting the sample image and an actual speed bump block;
[0146] The second obtaining submodule is configured to obtain the original speed bump recognition result according to the initial speed bump recognition result and the offset value.
[0147] Optionally, the first determining module 602 includes:
[0148] A second determination submodule is configured to determine a plurality of feature points corresponding to the lower edge of the speed bump according to the original speed bump recognition result;
[0149] The third obtaining submodule is configured to sequentially connect the feature points of different speed bumps corresponding to the original speed bump recognition results to obtain an original line segment set corresponding to the lower edge of the speed bump.
[0150] Optionally, the speed bump identification device 600 further includes:
[0151] A correction module is configured to correct the original speed bump recognition result according to fixed parameters of the camera to obtain a corrected recognition result, wherein the fixed parameters include an internal parameter matrix and a distortion parameter;
[0152] The first determining module 602 includes:
[0153] The third determination submodule is configured to determine an original line segment set corresponding to the lower edge of the speed bump according to the corrected recognition result.
[0154] Regarding the speed bump identification device 600 in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0155] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, and when the program instructions are executed by a processor, the steps of the speed bump identification method provided by the present disclosure are implemented.
[0156] The present disclosure also provides another speed bump identification device, including a processor;
[0157] a memory for storing processor-executable instructions;
[0158] Among them, the processor is configured to implement the steps of the speed bump identification method provided by the present disclosure when executed.
[0159] The present disclosure also provides a vehicle, comprising the speed bump identification device provided by the present disclosure.
[0160] Figure 7 700 is a block diagram of a vehicle according to an exemplary embodiment. For example, vehicle 700 may be a hybrid vehicle, a non-hybrid vehicle, an electric vehicle, a fuel cell vehicle, or other types of vehicles. Vehicle 700 may be an autonomous vehicle, a semi-autonomous vehicle, or a non-autonomous vehicle.
[0161] Reference Figure 7 , the vehicle 700 may include various subsystems, for example, an infotainment system 710, a perception system 720, a decision control system 730, a drive system 740, and a computing platform 750. The vehicle 700 may also include more or fewer subsystems, and each subsystem may include multiple components. In addition, each subsystem and each component of the vehicle 700 may be interconnected by wire or wireless means.
[0162] In some embodiments, the infotainment system 710 may include a communication system, an entertainment system, and a navigation system, etc.
[0163] The perception system 720 may include several sensors for sensing information about the environment around the vehicle 700. For example, the perception system 720 may include a global positioning system (the global positioning system may be a GPS system, or a Beidou system or other positioning systems), an inertial measurement unit (IMU), a laser radar, a millimeter wave radar, an ultrasonic radar, and a camera.
[0164] The decision control system 730 may include a computing system, a vehicle controller, a steering system, a throttle, and a braking system.
[0165] The drive system 740 may include components that provide power movement for the vehicle 700. In one embodiment, the drive system 740 may include an engine, an energy source, a transmission system, and wheels. The engine may be one or a combination of an internal combustion engine, an electric motor, and an air compression engine. The engine is capable of converting energy provided by the energy source into mechanical energy.
[0166] Some or all functions of the vehicle 700 are controlled by a computing platform 750. The computing platform 750 may include at least one processor 751 and a memory 752, and the processor 751 may execute instructions 753 stored in the memory 752.
[0167] The processor 751 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.
[0168] Memory 752 can be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0169] In addition to instructions 753 , memory 752 may also store data, such as road maps, route information, vehicle location, direction, speed, etc. The data stored in memory 752 may be used by computing platform 750 .
[0170] In the embodiment of the present disclosure, the processor 751 may execute the instruction 753 to complete all or part of the steps of the above-mentioned speed bump identification method.
[0171] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device. The computer program has a code portion for executing the above speed bump identification method when executed by the programmable device.
[0172] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0173] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A speed bump identification method, characterized in that: include: Obtain the original speed bump recognition result corresponding to the target image; According to the original speed bump recognition result, determine an original line segment set corresponding to a lower edge of the speed bump, where the lower edge is an edge of the speed bump contour close to a side of the target vehicle; According to a preset fusion condition, the original line segment set is fused to obtain a target line segment set, wherein the target line segment set includes at least one target line segment; Obtain a target speed bump recognition result according to the position of the target line segment in the target line segment set in the target image, wherein the number of speed bumps corresponding to the target speed bump recognition result is less than or equal to the number of speed bumps corresponding to the original speed bump recognition result; The step of fusing the original line segment set according to a preset fusion condition to obtain a target line segment set includes: The line segments satisfying the preset fusion condition among the multiple line segments in the original line segment set are respectively fused, so that the line segments in the original line segment set belonging to the same speed bump are fused into a target line segment, thereby obtaining the target line segment set.
2. The speed bump identification method according to claim 1, characterized in that: The step of fusing the original line segment set according to the preset fusion condition to obtain the target line segment set includes: According to the preset fusion condition, determining a similar cluster corresponding to each line segment in the original line segment set to obtain a plurality of original similar clusters; Establishing an association relationship between any two original similar clusters including the same line segment among the multiple original similar clusters; Classifying the multiple original similar clusters according to the association relationship to obtain at least one target similar cluster; The line segments in the at least one target homogeneous cluster are fused respectively to obtain the target line segment set, wherein the line segments in one target homogeneous cluster are fused to obtain one target line segment in the target line segment set.
3. The speed bump identification method according to claim 2, characterized in that: The step of determining the same type cluster corresponding to each line segment in the original line segment set according to the preset fusion condition includes: For any line segment in the original line segment set, the line segment is combined with the remaining line segments in the original line segment set to obtain a plurality of original line segment groups corresponding to the line segment; For any original line segment group corresponding to the line segment, if the original line segment group meets the preset fusion condition, determine the original line segment group as the target line segment group of the line segment; The line segments corresponding to all target line segment groups of the line segment are determined as the same type clusters corresponding to the line segment.
4. The speed bump identification method according to claim 3, characterized in that: The method further comprises: For any original line segment group corresponding to the line segment, determine the angle difference, mapping length difference and intercept of two line segments in the original line segment group, wherein the mapping length difference is the absolute value of the difference between the mapping length of the two line segments and the total length of the two line segments, and the mapping length is the line segment length obtained by mapping the shorter line segment of the two line segments to the longer line segment; When the angle difference between two line segments in the original line segment group is less than a preset angle threshold, the mapping length difference is less than a preset length threshold, and the intercept is less than a preset intercept threshold, it is determined that the original line segment group meets the preset fusion condition.
5. The speed bump identification method according to any one of claims 1 to 4, characterized in that: The obtaining of the original speed bump recognition result corresponding to the target image includes: Acquire the target image, where the target image is a road image; The target image is processed by a target recognition model to obtain an initial speed bump recognition result and an offset value, wherein the target recognition model is obtained by training a basic model with multiple sample images carrying annotated labels, and the annotated label of each sample image includes sub-offset values and actual speed bump blocks corresponding to multiple image blocks constituting the sample image; The original speed bump recognition result is obtained according to the initial speed bump recognition result and the offset value.
6. The speed bump recognition method according to any one of claims 1 to 4, characterized in that: The determining, according to the original speed bump recognition result, an original line segment set corresponding to the lower edge of the speed bump comprises: Determining, according to the original speed bump recognition result, a plurality of feature points corresponding to the lower edge of the speed bump; The feature points of different speed bumps corresponding to the original speed bump recognition results are connected in sequence to obtain an original line segment set corresponding to the lower edge of the speed bump.
7. The speed bump recognition method according to any one of claims 1 to 4, characterized in that: Before determining the original line segment set corresponding to the lower edge of the speed bump according to the original speed bump recognition result, the method further includes: Correcting the original speed bump recognition result according to fixed parameters of the camera to obtain a corrected recognition result, wherein the fixed parameters include an intrinsic parameter matrix and a distortion parameter; The determining, according to the original speed bump recognition result, an original line segment set corresponding to the lower edge of the speed bump comprises: According to the corrected recognition result, an original line segment set corresponding to the lower edge of the speed bump is determined.
8. A speed bump identification device, characterized in that: include: An acquisition module is configured to acquire an original speed bump recognition result corresponding to the target image; A first determination module is configured to determine an original line segment set corresponding to a lower edge of the speed bump according to the original speed bump recognition result, where the lower edge is an edge of the speed bump contour close to a side of the target vehicle; A first obtaining module is configured to fuse the original line segment set according to a preset fusion condition to obtain a target line segment set, wherein the target line segment set includes at least one target line segment; A second obtaining module is configured to obtain a target speed bump recognition result according to a position of a target line segment in the target line segment set in the target image, wherein the number of speed bumps corresponding to the target speed bump recognition result is less than or equal to the number of speed bumps corresponding to the original speed bump recognition result; Wherein, the first obtaining module is specifically configured as follows: The line segments satisfying the preset fusion condition among the multiple line segments in the original line segment set are respectively fused, so that the line segments in the original line segment set belonging to the same speed bump are fused into a target line segment, thereby obtaining the target line segment set.
9. A speed bump identification device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the steps of the speed bump identification method described in any one of claims 1 to 7 when executed.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the speed bump identification method described in any one of claims 1 to 7 are implemented.
11. A vehicle, characterized in that: It includes the speed bump identification device as claimed in claim 9.
