Speed bump identification method, device, storage medium and vehicle
By training the sample image model carrying the label, the initial speed bump recognition results and offset values are obtained and corrected, which solves the problem of poor speed bump recognition in the existing technology and achieves accurate recognition of slender and curved speed bumps. Identify.
Patent Information
- Application Number
- CN202410225076.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-28
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-02-28
AI Technical Summary
In the existing technology, due to its slender characteristics and possible bending deformation, combined with camera distortion, the speed bump does not satisfy the straight-line frame constraints in the image, resulting in poor recognition of the speed bump.
By training the sample image model carrying the label, the initial speed bump recognition results and offset values are obtained, and corrections are made to improve the recognition accuracy.
It achieves accurate identification of slender and curved speed bumps and improves the recognition effect of speed bumps.
Smart Images

Figure CN118097595B_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, a rotating frame detection scheme is used to identify speed bumps. However, due to the slender characteristics of speed bumps, the features of the center point itself are not obvious. In actual scenarios, speed bumps may bend and deform due to long-term use. Moreover, due to camera distortion, overly long speed bumps do not satisfy the constraints of the straight line frame in the image, resulting in poor recognition of speed bumps. 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 processes the target image by carrying a target recognition model trained with a plurality of sample images including sub-offset values corresponding to a plurality of image blocks constituting the sample image and actual speed bump blocks, and can identify and obtain an initial speed bump recognition result and an offset value, and correct the initial speed bump recognition result by the offset value, so as to obtain a more accurate speed bump recognition result, thereby improving the recognition effect of the speed bump.
[0004] According to a first aspect of an embodiment of the present disclosure, a speed bump identification method is provided, comprising:
[0005] Acquire a target image, where the target image is a road image;
[0006] 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;
[0007] A target speed bump recognition result is obtained according to the initial speed bump recognition result and the offset value.
[0008] Optionally, the target recognition model is trained by the following steps:
[0009] Acquire the plurality of sample images carrying the annotated labels;
[0010] Performing multiple rounds of iterative training on the basic model according to the multiple sample images carrying the annotated labels;
[0011] After each round of iterative training, the predicted speed bump recognition result and predicted offset value output by the current round of iterative training are obtained;
[0012] According to the predicted speed bump recognition result and the predicted offset value outputted by this round of iterative training, and the annotated labels of the sample images in this round of iterative training, the offset value loss and the speed bump loss corresponding to this round of iterative training are obtained;
[0013] Optimizing the basic model according to the offset loss and speed bump loss corresponding to this round of iterative training;
[0014] When the basic model meets the preset conditions, the training is stopped to obtain the target recognition model.
[0015] Optionally, acquiring the plurality of sample images carrying annotated labels includes:
[0016] Acquire multiple sample images after pre-labeling actual speed bumps;
[0017] For any sample image among a plurality of sample images pre-labeled for actual speed bumps, segment the sample image to obtain a plurality of image blocks constituting the sample image;
[0018] Determine the sub-offset value and the actual speed bump block corresponding to each image block constituting the sample image;
[0019] Re-labeling the sample image according to the sub-offset value corresponding to each image block constituting the sample image and the actual speed bump block;
[0020] The multiple sample images after re-labeling are determined as the multiple sample images carrying the labeled labels.
[0021] Optionally, the step of obtaining a plurality of sample images after pre-labeling actual speed bumps includes:
[0022] Acquire a plurality of original sample images, where the original sample images are images acquired by the vehicle and include actual speed bumps;
[0023] For any original sample image, the original sample image is pre-marked according to the position of the actual speed bump in the original sample image, so as to obtain a sample image corresponding to the original sample image after the actual speed bump is pre-marked;
[0024] The plurality of original sample images after pre-labeling are determined as the plurality of sample images after pre-labeling of the actual speed bumps.
[0025] Optionally, the determining the sub-offset value and the actual speed bump block corresponding to each image block constituting the sample image includes:
[0026] According to the position of the actual speed bump in the pre-marked sample image, determining the corresponding target pixel point in each image block constituting the sample image, wherein the target pixel point is the pixel point constituting the actual speed bump;
[0027] The sub-offset value and the actual speed bump block corresponding to each image block constituting the sample image are determined according to the pixel coordinates and the number of the corresponding target pixel points in each image block.
[0028] Optionally, the initial speed bump recognition result includes a probability that each pixel point in the target image is a pixel point constituting an actual speed bump;
[0029] The step of obtaining a target speed bump recognition result according to the initial speed bump recognition result and the offset value includes:
[0030] Binarizing the initial speed bump recognition result according to a preset probability threshold to obtain a mask image;
[0031] Performing edge detection on the speed bump on the mask image to obtain a speed bump outline;
[0032] Correcting the speed bump profile by using the offset value to obtain a target profile;
[0033] The target speed bump recognition result is obtained according to the position of the target contour in the target image.
[0034] Optionally, before correcting the speed bump profile by using the offset value to obtain a target profile, the method further includes:
[0035] Determine the number of pixels included in each speed bump outline;
[0036] Determine the speed bump contour whose number of pixels is greater than or equal to a preset pixel threshold as a candidate contour;
[0037] The step of correcting the speed bump profile by using the offset value to obtain a target profile includes:
[0038] The candidate contour is corrected by using the offset value to obtain the target contour.
[0039] According to a second aspect of an embodiment of the present disclosure, there is provided a speed bump identification device, comprising:
[0040] A first acquisition module is configured to acquire a target image, wherein the target image is a road image;
[0041] A first acquisition module 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;
[0042] The second obtaining module is configured to obtain a target speed bump identification result according to the initial speed bump identification result and the offset value.
[0043] According to a third aspect of an embodiment of the present disclosure, a speed bump identification device is provided, comprising:
[0044] processor;
[0045] a memory for storing processor-executable instructions;
[0046] 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.
[0047] 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.
[0048] 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.
[0049] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0050] The target image is acquired and processed by a target recognition model to obtain an initial speed bump recognition result and an offset value. The target recognition model is obtained by training a basic model with multiple sample images carrying annotated labels. 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. Then, the target speed bump recognition result is obtained based on the initial speed bump recognition result and the offset value. The target image is processed by a target recognition model obtained by training multiple sample images carrying annotated labels including sub-offset values and actual speed bump blocks corresponding to multiple image blocks constituting the sample image. 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 that a more accurate speed bump recognition result can be obtained to improve the recognition effect of the speed bump.
[0051] 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
[0052] 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.
[0053] Figure 1 The figure is a flow chart of a speed bump identification method according to an exemplary embodiment.
[0054] Figure 2 The figure is a flowchart of a method for acquiring multiple sample images carrying annotated labels according to an exemplary embodiment.
[0055] Figure 3 The figure is a flow chart of another speed bump identification method according to an exemplary embodiment.
[0056] Figure 4 The figure is a block diagram of a speed bump identification device according to an exemplary embodiment.
[0057] Figure 5 is a block diagram of a vehicle according to an exemplary embodiment. DETAILED DESCRIPTION
[0058] 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.
[0059] 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.
[0060] Figure 1 is a flow chart of a speed bump identification method according to an exemplary embodiment. Figure 1 As shown, the method may include the following steps.
[0061] In step S101 , a target image is acquired, where the target image is a road image.
[0062] 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.
[0063] In step S102, the target image is processed by a target recognition model to obtain an initial speed bump recognition result and an offset value. The target recognition model is obtained by training a basic model with multiple sample images carrying annotated labels. 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.
[0064] In this embodiment, a target recognition model can be obtained by training a basic model with a plurality of sample images carrying annotated labels in advance, 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 the pixel points 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.
[0065] In step S103, a target speed bump recognition result is obtained according to the initial speed bump recognition result and the offset value.
[0066] In this embodiment, the predicted speed bump may be determined according to the initial speed bump recognition result, and the predicted speed bump may be corrected according to the offset value, so as to obtain a more accurate target speed bump recognition result.
[0067] 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.
[0068] In a possible implementation, the target recognition model can be trained by the following steps:
[0069] 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.
[0070] 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.
[0071] 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.
[0072] Figure 2 is a flowchart of a method for obtaining a plurality of sample images carrying annotated labels according to an exemplary embodiment. Figure 2 As shown, in a possible implementation manner, a method for acquiring a plurality of sample images carrying annotated labels may include the following steps:
[0073] In step S201, a plurality of sample images of actual speed bumps that are pre-labeled are obtained.
[0074] In step S202, for any sample image among a plurality of sample images in which actual speed bumps are pre-labeled, the sample image is segmented to obtain a plurality of image blocks constituting the sample image.
[0075] In step S203, the sub-offset value and the actual speed bump block corresponding to each image block constituting the sample image are determined.
[0076] In step S204, the sample image is re-labeled according to the sub-offset value corresponding to each image block constituting the sample image and the actual speed bump block.
[0077] In step S205, the multiple sample images after re-annotation are determined as multiple sample images carrying annotated labels.
[0078] 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.
[0079] In a possible implementation, a method for obtaining a plurality of sample images pre-labeled for actual speed bumps may be:
[0080] 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.
[0081] In this embodiment, a plurality of original sample images with known actual speed bump positions can be obtained, and the actual speed bump positions can be input manually. After obtaining the actual speed bump positions, the original sample images can be pre-labeled according to the actual speed bump positions, so as to obtain a plurality of sample images with pre-labeled actual speed bumps.
[0082] 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:
[0083] 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.
[0084] 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.
[0085] 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;
[0086] According to the initial speed bump recognition result and the offset value, the target speed bump recognition result is obtained, which may include:
[0087] 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 position of the target contour in the target image.
[0088] 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; 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. For the speed bump in the mask image, edge detection is performed on the speed bump, specifically, edge detection can be performed using a Sobel operator, thereby obtaining 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 are 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, including the size, length, height of the speed bump, and the distance between the speed bump and the vehicle, etc., is obtained, so as to obtain the target speed bump recognition result. In order to adjust the vehicle according to the target speed bump recognition result, for example, adjust the parameters such as the vehicle's air suspension system and torque. Through this method, slender speed bumps can be better identified, and the contours of curved and deformed speed bumps 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.
[0089] 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;
[0090] The speed bump contours with the number of pixels greater than or equal to the preset pixel threshold are determined as candidate contours.
[0091] 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 contours with a pixel number greater than or equal to a preset pixel threshold are determined as candidate contours.
[0092] 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.
[0093] 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.
[0094] Figure 3 is a flow chart showing another method for identifying a speed bump according to an exemplary embodiment. Figure 3 As shown, the following steps are included:
[0095] In step S301, a pre-annotated sample image is obtained. The original sample images collected by multiple sensors may be obtained. The speed bumps in the original sample image are pre-annotated to obtain the pre-annotated sample image.
[0096] In step S302, each pre-annotated sample image is segmented, and the cumulative sum of coordinates and the number of pixels of the speed bump block in each image block are determined. Each pre-annotated sample image can be segmented to obtain a plurality of corresponding image blocks after segmentation, and the cumulative sum of coordinates and the number of pixels of the speed bump block in each image block are counted.
[0097] In step S303, the sub-offset value of each image block is obtained. The sub-offset value of each image block can be determined according to the cumulative sum of the coordinates of the speed bump blocks in each image block and the number of pixels.
[0098] In step S304, a speed bump mask of the sample image is obtained. In this embodiment, the value of the pixel points of the speed bump block part in each image block can be determined as 1, and the value of the pixel points of the remaining part can be determined as 0, so as to obtain the speed bump mask of the sample image, so as to perform re-annotation and obtain a sample image with annotated labels.
[0099] In step S305, the encoder-decoder network structure combining segmentation and offset points, i.e., the basic model, can be trained by sample images carrying annotated labels to obtain an object recognition model.
[0100] In step S306, the initial speed bump recognition result predicted for the target image is binarized. The target image can be processed by the target recognition model to obtain the initial speed bump recognition result and the offset value, and the initial speed bump recognition result is binarized to obtain a mask image.
[0101] In step S307, the Sobel operator performs edge detection. The Sobel operator can be used to perform edge detection on the mask image for the speed bump.
[0102] In step S308, the speed bump contour is extracted. The speed bump contour obtained by edge detection can be subjected to speed bump contour extraction to obtain the speed bump contour.
[0103] In step S309, abnormal speed bumps are filtered to obtain candidate contours. For each speed bump contour, the number of pixels included in each speed bump contour is determined, and speed bump contours with a number of pixels greater than or equal to a preset pixel threshold are determined as candidate contours.
[0104] In step S310, edge regression is performed on the candidate contour using the predicted offset value, and the candidate contour is corrected using the offset value to obtain the target contour.
[0105] In step S311, the target speed bump recognition result is obtained. The target speed bump recognition result can be obtained according to the position of the target contour in the target image.
[0106] In step S312, the air suspension system and torque of the vehicle are adjusted. According to the target speed bump identification result, the vehicle is adjusted, for example, the air suspension system and torque of the vehicle are adjusted.
[0107] Figure 4 is a block diagram of a speed bump identification device according to an exemplary embodiment. Figure 4 The speed bump identification device 400 includes a first acquisition module 401 , a first acquisition module 402 and a second acquisition module 403 .
[0108] The first acquisition module 401 is configured to acquire a target image, wherein the target image is a road image;
[0109] The first obtaining module 402 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;
[0110] The second obtaining module 403 is configured to obtain a target speed bump identification result according to the initial speed bump identification result and the offset value.
[0111] Optionally, the speed bump identification device 400 further includes:
[0112] A second acquisition module is configured to acquire the plurality of sample images carrying the annotated labels;
[0113] A training module, configured to perform multiple rounds of iterative training on the basic model according to the multiple sample images carrying the annotated labels;
[0114] A third acquisition module is configured to acquire, after each round of iterative training, a predicted speed bump recognition result and a predicted offset value output by the current round of iterative training;
[0115] A third obtaining module is configured to obtain the offset value loss and the speed bump loss corresponding to the current round of iterative training according to the predicted speed bump recognition result and the predicted offset value output by the current round of iterative training, and the annotation labels of the sample images in the current round of iterative training;
[0116] An optimization module, configured to optimize the basic model according to the offset loss and the speed bump loss corresponding to the current round of iterative training;
[0117] The fourth acquisition module is configured to stop training and obtain the target recognition model when the basic model meets the preset conditions.
[0118] Optionally, the second acquisition module 403 includes:
[0119] An acquisition submodule is configured to acquire a plurality of sample images after pre-labeling of actual speed bumps;
[0120] A segmentation submodule is configured to segment any sample image among a plurality of sample images pre-labeled with actual speed bumps to obtain a plurality of image blocks constituting the sample image;
[0121] A first determination submodule is configured to determine the sub-offset value and the actual speed bump block corresponding to each image block constituting the sample image;
[0122] A re-annotation submodule is configured to re-annotate the sample image according to the sub-offset value corresponding to each image block constituting the sample image and the actual speed bump block;
[0123] The second determination submodule is configured to determine the multiple sample images after re-labeling as the multiple sample images carrying the labeled labels.
[0124] Optionally, the acquisition submodule includes:
[0125] An acquisition unit is configured to acquire a plurality of original sample images, wherein the original sample images are images acquired by the vehicle and include actual speed bumps;
[0126] The obtaining unit is configured to pre-mark any 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 the actual speed bump is pre-marked;
[0127] The first determining unit is configured to determine the plurality of original sample images after pre-labeling as the plurality of sample images after pre-labeling the actual speed bumps.
[0128] Optionally, the first determining module includes:
[0129] A third determination submodule is configured to determine, 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, wherein the target pixel point is the pixel point constituting the actual speed bump;
[0130] The fourth determination submodule is configured to determine the sub-offset value and the actual speed bump block corresponding to each image block constituting the sample image according to the pixel coordinates and the number of the corresponding target pixel points in each image block.
[0131] Optionally, the initial speed bump recognition result includes a probability that each pixel point in the target image is a pixel point constituting an actual speed bump;
[0132] The second obtaining module 403 includes:
[0133] A first obtaining submodule is configured to binarize the initial speed bump recognition result according to a preset probability threshold to obtain a mask image;
[0134] A detection submodule is configured to perform edge detection on the mask image for the speed bump to obtain a speed bump outline;
[0135] A correction submodule is configured to correct the speed bump profile by using the offset value to obtain a target profile;
[0136] The second obtaining submodule is configured to obtain the target speed bump recognition result according to the position of the target contour in the target image.
[0137] Optionally, the speed bump identification device 400 further includes:
[0138] A first determination module is configured to determine the number of pixels included in the outline of each speed bump;
[0139] A second determination module is configured to determine a speed bump contour whose number of pixels is greater than or equal to a preset pixel threshold as a candidate contour;
[0140] The correction submodule comprises:
[0141] The correction unit is configured to correct the candidate contour by using the offset value to obtain the target contour.
[0142] Regarding the speed bump identification device 400 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.
[0143] 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.
[0144] The present disclosure also provides another speed bump identification device, including a processor;
[0145] a memory for storing processor-executable instructions;
[0146] Among them, the processor is configured to implement the steps of the speed bump identification method provided by the present disclosure when executed.
[0147] The present disclosure also provides a vehicle, comprising the speed bump identification device provided by the present disclosure.
[0148] Figure 5 5 is a block diagram of a vehicle according to an exemplary embodiment. For example, vehicle 500 may be a hybrid vehicle, a non-hybrid vehicle, an electric vehicle, a fuel cell vehicle, or other types of vehicles. Vehicle 500 may be an autonomous vehicle, a semi-autonomous vehicle, or a non-autonomous vehicle.
[0149] Reference Figure 5 , the vehicle 500 may include various subsystems, for example, an infotainment system 510, a perception system 520, a decision control system 530, a drive system 540, and a computing platform 550. The vehicle 500 may also include more or fewer subsystems, and each subsystem may include multiple components. In addition, each subsystem and each component of the vehicle 500 may be interconnected by wire or wireless means.
[0150] In some embodiments, the infotainment system 510 may include a communication system, an entertainment system, and a navigation system, among others.
[0151] The perception system 520 may include several sensors for sensing information about the environment around the vehicle 500. For example, the perception system 520 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.
[0152] The decision control system 530 may include a computing system, a vehicle controller, a steering system, a throttle, and a braking system.
[0153] The drive system 540 may include components that provide powered motion for the vehicle 500. In one embodiment, the drive system 540 may include an engine, an energy source, a transmission system, and wheels. The engine may be an internal combustion engine, an electric motor, an air compression engine, or a combination of one or more thereof. The engine is capable of converting energy provided by the energy source into mechanical energy.
[0154] Some or all functions of the vehicle 500 are controlled by a computing platform 550. The computing platform 550 may include at least one processor 551 and a memory 552, and the processor 551 may execute instructions 553 stored in the memory 552.
[0155] The processor 551 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.
[0156] The memory 552 may 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 storage, flash memory, magnetic disk or optical disk.
[0157] In addition to instructions 553 , memory 552 may also store data, such as road maps, route information, vehicle location, direction, speed, etc. The data stored in memory 552 may be used by computing platform 550 .
[0158] In the embodiment of the present disclosure, the processor 551 may execute the instruction 553 to complete all or part of the steps of the above-mentioned speed bump identification method.
[0159] 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.
[0160] 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.
[0161] 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: Acquire a 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. The target recognition model is obtained by training a basic model with multiple sample images carrying annotated labels. 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 initial speed bump recognition result includes the probability that each pixel point in the target image is a pixel point constituting an actual speed bump. Binarizing the initial speed bump recognition result according to a preset probability threshold to obtain a mask image; Performing edge detection on the speed bump on the mask image to obtain a speed bump outline; Correcting the speed bump profile by using the offset value to obtain a target profile; Obtaining a target speed bump recognition result according to a position of the target contour in the target image; The target recognition model is trained by the following steps: Acquire the plurality of sample images carrying the annotated labels; Performing multiple rounds of iterative training on the basic model according to the multiple sample images carrying the annotated labels; After each round of iterative training, the predicted speed bump recognition result and predicted offset value output by the current round of iterative training are obtained; According to the predicted speed bump recognition result and the predicted offset value outputted by this round of iterative training, and the annotated labels of the sample images in this round of iterative training, the offset value loss and the speed bump loss corresponding to this round of iterative training are obtained, wherein the speed bump loss is the distance between the predicted speed bump recognition result and the actual speed bump blocks corresponding to the multiple image blocks constituting each sample image in the annotated labels of the sample images in this round of iterative training; Optimizing the basic model according to the offset loss and speed bump loss corresponding to this round of iterative training; When the basic model meets the preset conditions, the training is stopped to obtain the target recognition model.
2. The speed bump identification method according to claim 1, characterized in that: The obtaining of the plurality of sample images carrying the annotated labels comprises: Acquire multiple sample images after pre-labeling actual speed bumps; For any sample image among a plurality of sample images pre-labeled for actual speed bumps, segment the sample image to obtain a plurality of image blocks constituting the sample image; Determine the sub-offset value and the actual speed bump block corresponding to each image block constituting the sample image; Re-labeling the sample image according to the sub-offset value corresponding to each image block constituting the sample image and the actual speed bump block; The multiple sample images after re-labeling are determined as the multiple sample images carrying the labeled labels.
3. The speed bump identification method according to claim 2, characterized in that: The step of obtaining a plurality of sample images after pre-labeling actual speed bumps includes: Acquire a plurality of original sample images, where the original sample images are images acquired by the vehicle and include actual speed bumps; For any original sample image, the original sample image is pre-marked according to the position of the actual speed bump in the original sample image, so as to obtain a sample image corresponding to the original sample image after the actual speed bump is pre-marked; The plurality of original sample images after pre-labeling are determined as the plurality of sample images after pre-labeling of the actual speed bumps.
4. The speed bump identification method according to claim 2, characterized in that: The determining the sub-offset value and the actual speed bump block corresponding to each image block constituting the sample image comprises: According to the position of the actual speed bump in the pre-marked sample image, determining the corresponding target pixel point in each image block constituting the sample image, wherein the target pixel point is the pixel point constituting the actual speed bump; The sub-offset value and the actual speed bump block corresponding to each image block constituting the sample image are determined according to the pixel coordinates and the number of the corresponding target pixel points in each image block.
5. The speed bump identification method according to claim 1, characterized in that: Before correcting the speed bump profile by using the offset value to obtain the target profile, the method further includes: Determine the number of pixels included in each speed bump outline; Determine the speed bump contour whose number of pixels is greater than or equal to a preset pixel threshold as a candidate contour; The step of correcting the speed bump profile by using the offset value to obtain a target profile includes: The candidate contour is corrected by using the offset value to obtain the target contour.
6. A speed bump identification device, characterized in that: include: A first acquisition module is configured to acquire a target image, wherein the target image is a road image; A first acquisition module 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, wherein the annotated label of each sample image includes a sub-offset value and an actual speed bump block corresponding to a plurality of image blocks constituting the sample image, and the initial speed bump recognition result includes a probability that each pixel point in the target image is a pixel point constituting an actual speed bump; A first obtaining submodule is configured to binarize the initial speed bump recognition result according to a preset probability threshold to obtain a mask image; A detection submodule is configured to perform edge detection on the mask image for the speed bump to obtain a speed bump outline; A correction submodule is configured to correct the speed bump profile by using the offset value to obtain a target profile; A second obtaining submodule is configured to obtain a target speed bump recognition result according to a position of the target contour in the target image; The speed bump identification device further comprises: A second acquisition module is configured to acquire the plurality of sample images carrying the annotated labels; A training module, configured to perform multiple rounds of iterative training on the basic model according to the multiple sample images carrying the annotated labels; A third acquisition module is configured to acquire, after each round of iterative training, a predicted speed bump recognition result and a predicted offset value output by the current round of iterative training; a third obtaining module, configured to obtain an offset value loss and a speed bump loss corresponding to the current round of iterative training according to the predicted speed bump recognition result and the predicted offset value outputted by the current round of iterative training, and the annotated labels of the sample images in the current round of iterative training, wherein the speed bump loss is a distance between the predicted speed bump recognition result and actual speed bump blocks corresponding to a plurality of image blocks constituting each sample image in the annotated labels of the sample images in the current round of iterative training; An optimization module, configured to optimize the basic model according to the offset loss and the speed bump loss corresponding to the current round of iterative training; The fourth acquisition module is configured to stop training and obtain the target recognition model when the basic model meets the preset conditions.
7. 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 5 when executed.
8. 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 5 are implemented.
9. A vehicle, characterized in that: It includes the speed bump identification device as claimed in claim 7.
Citation Information
Patent Citations
Deceleration strip recognition method and system
CN111738040A
Road surface object recognition method and device, computer equipment and storage medium
CN112307989A
Target recognition model training method and device and electronic equipment
CN112990432A
Deceleration strip detection method, system and device and computer readable storage medium
CN113807293A
Intelligent deceleration strip recognition method, device and equipment and storage medium
CN114119717A
