Calibration method and device for vehicle, equipment and medium
By obtaining the 2D and 3D detection boxes around the vehicle, selecting candidate calibration parameters and calculating the interchange ratio, and automatically updating the calibration parameters, the problem of inaccurate sensor calibration parameters is solved, fast and efficient automatic calibration is achieved, and accuracy and processing efficiency is improved.
Patent Information
- Application Number
- CN202311344826.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-17
- Publication Date
- 2025-04-18
AI Technical Summary
Due to installation deviations, wear of parts and loose fixing components in the vehicle, the calibration parameters are inaccurate, affecting the accuracy of autonomous driving and perception environment. It is difficult for the prior art to achieve fast and efficient sensor calibration.
By obtaining the 2D and 3D detection boxes around the vehicle, selecting multiple candidate calibration parameters, projecting the 3D detection box onto the 2D detection box plane according to each candidate parameter, calculating the interchange ratio, and updating the calibration parameters to be corrected to achieve automatic correction of calibration parameters.
It realizes automatic correction of calibration parameters without manual calibration, saves labor costs, improves real-time and processing efficiency, and ensures the accuracy of calibration parameters.
Smart Images

Figure CN119850745A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a calibration method, device, equipment and medium for a vehicle. Background Art
[0002] With the development of artificial intelligence and autonomous driving technology, sensors play an important role in perceiving environmental information. Usually, there are multiple sensors installed on vehicles, and whether the calibration parameters of the sensors are accurate affects the accuracy of the application. When the vehicle leaves the factory, the corresponding calibration parameters are usually provided. However, there may be installation deviations when the vehicle leaves the factory. Later, during the use of the vehicle, the parts in the sensor may wear out, and the parts that fix the sensor may become loose, especially the laser radar, which has rotating parts inside. Even a slight displacement of the parts may cause large measurement deviations. Therefore, how to avoid using manual methods to calibrate the sensor and quickly and efficiently complete the sensor calibration work has become an urgent problem to be solved. Summary of the invention
[0003] In order to solve the above technical problems, the present disclosure provides a calibration method, device, equipment and storage medium for a vehicle.
[0004] In a first aspect, an embodiment of the present disclosure provides a calibration method for a vehicle, comprising:
[0005] Acquire a first detection frame and a second detection frame of a target object around the vehicle, wherein the first detection frame is obtained by 2D object detection, and the second detection frame is obtained by 3D object detection;
[0006] Acquire a calibration parameter to be corrected, and select a plurality of candidate calibration parameters within a preset range including the calibration parameter to be corrected;
[0007] According to each of the candidate calibration parameters, projecting the second detection frame onto the plane where the first detection frame is located, to obtain a third detection frame corresponding to each of the candidate calibration parameters;
[0008] Calculating an intersection-and-union ratio between each third detection frame and the first detection frame to obtain an intersection-and-union ratio corresponding to each of the candidate calibration parameters;
[0009] The calibration parameters to be corrected are updated according to the candidate calibration parameters corresponding to the intersection-over-union ratios that meet the preset conditions.
[0010] In a second aspect, an embodiment of the present disclosure provides a calibration device for a vehicle, comprising:
[0011] A detection module, used to obtain a first detection frame and a second detection frame of a target object around the vehicle, wherein the first detection frame is obtained by 2D object detection and the second detection frame is obtained by 3D object detection;
[0012] An acquisition module, used for acquiring the calibration parameters to be corrected, and selecting a plurality of candidate calibration parameters within a preset range including the calibration parameters to be corrected;
[0013] a projection module, configured to project the second detection frame onto a plane where the first detection frame is located according to each of the candidate calibration parameters, so as to obtain a third detection frame corresponding to each of the candidate calibration parameters;
[0014] A determination module, configured to calculate an intersection-and-union ratio between each third detection frame and the first detection frame to obtain an intersection-and-union ratio corresponding to each of the candidate calibration parameters;
[0015] The updating module is used to update the calibration parameters to be corrected according to the candidate calibration parameters corresponding to the intersection-over-union ratio that meets the preset conditions.
[0016] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the calibration method for a vehicle described in the first aspect above.
[0017] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the calibration method for a vehicle described in the first aspect is implemented.
[0018] In a fifth aspect, an embodiment of the present disclosure provides a vehicle, comprising a calibration device for a vehicle as described in the second aspect above, or an electronic device as described in the third aspect above.
[0019] Compared with the prior art, the technical solution provided by the disclosed embodiment has the following advantages: by acquiring a first detection frame and a second detection frame of a target object around a vehicle, and selecting a plurality of candidate calibration parameters within a preset range including the calibration parameters to be corrected, according to each candidate calibration parameter, the second detection frame is projected onto the plane where the first detection frame is located, to obtain a third detection frame corresponding to each candidate calibration parameter, and the intersection and union ratio between each third detection frame and the first detection frame is calculated to obtain the intersection and union ratio corresponding to each of the candidate calibration parameters, and updating the calibration parameters to be corrected according to the candidate calibration parameters corresponding to the intersection and union ratio that meets the preset conditions, thereby taking the first detection frame as the true value, and determining the updated calibration parameters from the plurality of candidate calibration parameters based on the intersection and union ratio between each third detection frame and the first detection frame, thereby realizing automatic correction of the calibration parameters without manual calibration, and compared with the manual calibration method, saving the cost of manual calibration and improving real-time performance and processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] 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.
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0022] Figure 1 A schematic diagram of a flow chart of a vehicle calibration method provided by an embodiment of the present disclosure;
[0023] Figure 2 A schematic flow chart of another vehicle calibration method provided by an embodiment of the present disclosure;
[0024] Figure 3 A schematic diagram of a detection frame provided by an embodiment of the present disclosure;
[0025] Figure 4 A schematic structural diagram of a vehicle calibration device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0027] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0028] Figure 1 A flow chart of a calibration method for a vehicle provided in an embodiment of the present disclosure. The method provided in an embodiment of the present disclosure can be executed by a calibration device for a vehicle, which can be implemented in software and / or hardware and can be integrated on any electronic device with computing capabilities, such as a vehicle-mounted terminal.
[0029] like Figure 1 As shown, the calibration method for a vehicle provided by the embodiment of the present disclosure may include:
[0030] Step 101: Acquire a first detection frame and a second detection frame of a target object around a vehicle.
[0031] The first detection frame is obtained by 2D object detection, and the second detection frame is obtained by 3D object detection.
[0032] In this embodiment, the target objects around the vehicle are detected by 2D object detection to generate a first detection frame of the target object, and the target objects around the vehicle are detected by 3D object detection to generate a second detection frame of the target object. The first detection frame and the second detection frame are the results of object detection and are used to indicate the position of the target object.
[0033] The target objects include but are not limited to vehicles, pedestrians, etc. 2D object detection is object detection based on two-dimensional data, such as images, and 3D object detection is object detection based on three-dimensional data, such as point cloud data. 2D object detection and 3D object detection can be implemented using relevant artificial intelligence algorithms, and no specific restrictions are made here.
[0034] The following is an example of obtaining a first detection frame and a second detection frame of a target object around a vehicle.
[0035] As an example, a vehicle is provided with a camera and a laser radar, the camera is used to collect target images around the vehicle, the laser radar is used to collect point cloud data around the vehicle, a first detection frame of a target object in the target image is determined by 2D object detection, and a second detection frame of the target object is determined by 3D object detection. Taking the target object as a vehicle as an example, the target image collected by the camera is input into a pre-trained 2D object detection model for detection to obtain a first detection frame of the vehicle object in the target image, and the point cloud data collected by the laser radar is input into a pre-trained 3D object detection model for detection to obtain a second detection frame of the vehicle object. The input of the 2D object detection model is an image, and the output is a detection frame of the vehicle in the image, and the input of the 3D object detection model is point cloud data within the acquisition range, and the output is a detection frame of the vehicle within the acquisition range.
[0036] Step 102 : obtaining a calibration parameter to be corrected, and selecting a plurality of candidate calibration parameters within a preset range including the calibration parameter to be corrected.
[0037] In this embodiment, the calibration parameters to be corrected are pre-acquired calibration parameters, such as calibration parameters calibrated when the vehicle leaves the factory. Optionally, the calibration parameters are external parameters between the first device and the second device, and the external parameters are used for the conversion relationship between the coordinate system corresponding to the first device and the coordinate system corresponding to the second device, for example, the first device is a camera and the second device is a laser radar.
[0038] In practical applications, since the accuracy of the calibration parameters obtained in advance is not high and it is difficult to meet the accuracy requirements of scenes such as autonomous driving, in this embodiment, multiple candidate calibration parameters are selected within a preset range to determine calibration parameters that meet the accuracy requirements from the multiple candidate calibration parameters. Among them, the multiple candidate calibration parameters selected within the preset range can be selected randomly or at a certain interval, and there is no specific limitation here.
[0039] The following describes how to implement the selection of multiple candidate calibration parameters.
[0040] In one embodiment of the present disclosure, the calibration parameters to be corrected are converted into the form of Euler angles to obtain the current yaw angle, pitch angle, and roll angle, which are used as the initial yaw angle, initial pitch angle, and initial roll angle. Then, with the initial yaw angle, initial pitch angle, and initial roll angle as the center, within a preset angle range, multiple candidate yaw angles, multiple candidate pitch angles, and multiple candidate roll angles are determined according to a preset angle step. Furthermore, format conversion is performed based on the multiple candidate yaw angles, multiple candidate pitch angles, and multiple candidate roll angles to generate multiple candidate calibration parameters.
[0041] As an example, with the initial yaw angle, initial pitch angle and initial roll angle as the center, the step length is 0.05 degrees, the upper limit is 1 degree, and the yaw, pitch and roll directions are moved to determine multiple candidate yaw angles, multiple candidate pitch angles and multiple candidate roll angles. In this example, multiple candidate yaw angles, multiple candidate pitch angles and multiple candidate roll angles are combined and format converted to generate multiple candidate calibration parameters. For example, for 20 candidate yaw angles, 20 candidate pitch angles and 20 candidate roll angles, a total of 8000 candidate calibration parameters are obtained.
[0042] It should be noted that this embodiment does not limit the execution order of step 101 and step 102.
[0043] Step 103: According to each candidate calibration parameter, the second detection frame is projected onto the plane where the first detection frame is located, so as to obtain a third detection frame corresponding to each candidate calibration parameter.
[0044] In this embodiment, the first detection frame and the third detection frame are two-dimensional detection frames on the same plane. Optionally, the calibration parameters are external parameters between the first device and the second device. The data collected by the first device is used for 2D object detection, and the data collected by the second device is used for 3D object detection. For each candidate calibration parameter, the second detection frame can be projected onto the plane where the first detection frame is located to obtain the third detection frame.
[0045] As an example, taking a camera and a lidar as an example, the calibration parameters are the external parameters between the camera and the lidar. By performing 2D object detection on the target image captured by the camera, the first detection frame of the target object A is determined in the target image, and by performing 3D object detection on the point cloud data captured by the lidar, the second detection frame of the target object A is obtained. Then, the second detection frame is projected into the target image through the candidate calibration parameters to obtain the third detection frame of the target object A. Therefore, for the second detection frame of the target object A, K third detection frames can be obtained correspondingly through K candidate calibration parameters.
[0046] Step 104 , calculating the intersection-and-union ratio between each third detection frame and the first detection frame to obtain the intersection-and-union ratio corresponding to each candidate calibration parameter.
[0047] In this embodiment, for each candidate calibration parameter, the intersection over union (IOU) between the third detection frame corresponding to the candidate calibration parameter and the first detection frame is calculated to obtain the IOU corresponding to the candidate calibration parameter. Taking the target object A as an example, the second detection frame is transformed by the candidate calibration parameter K1 to obtain the detection frame a1, and the IOU between the detection frame a1 and the first detection frame is calculated as the IOU corresponding to K1, and the second detection frame is transformed by the candidate calibration parameter K2 to obtain the detection frame a2, and the IOU between the detection frame a2 and the first detection frame is calculated as the IOU corresponding to K2.
[0048] Step 105 : updating the calibration parameters to be corrected according to the candidate calibration parameters corresponding to the intersection-over-union ratios that meet the preset conditions.
[0049] In this embodiment, an I / O ratio that satisfies a preset condition is determined from the I / O ratios corresponding to a plurality of candidate calibration parameters, and the candidate calibration parameter corresponding to the I / O ratio is used as the updated calibration parameter. The size of the I / O ratio is positively correlated with the accuracy of the candidate calibration parameter, for example, the candidate calibration parameter with a larger I / O ratio is more accurate.
[0050] As an example, the maximum I / O ratio is determined from the I / O ratios corresponding to the multiple candidate calibration parameters, and then the maximum I / O ratio is determined to meet the preset conditions. In this example, taking the candidate calibration parameters K1 and K2 as examples, if the I / O ratio corresponding to K1 is greater than the I / O ratio corresponding to K2, the calibration parameter to be corrected is updated according to K1.
[0051] As another example, from the intersection-and-union ratios corresponding to multiple candidate calibration parameters, an intersection-and-union ratio greater than a preset threshold is determined, and then, it is determined that the intersection-and-union ratio greater than the preset threshold satisfies the preset condition. In this example, taking candidate calibration parameters K1 and K2 as examples, if the intersection-and-union ratio corresponding to K1 is greater than the threshold, and the intersection-and-union ratio corresponding to K2 is less than the threshold, the calibration parameter to be corrected is updated according to K1. Optionally, if the intersection-and-union ratios corresponding to multiple candidate calibration parameters are all greater than the preset threshold, it can be determined that the largest intersection-and-union ratio satisfies the preset condition, or it can be determined that any of the intersection-and-union ratios satisfies the preset condition.
[0052] Optionally, the updated calibration parameters can be applied to the detection results of the projected 3D object detection model. By taking the first detection box as the true value and determining the updated calibration parameters based on the intersection and union ratio of the third detection box and the first detection box, more accurate calibration parameters can be obtained, thereby improving the accuracy of the projection of the detection results.
[0053] According to the technical solution of the embodiment of the present disclosure, by acquiring the first detection frame and the second detection frame of the target object around the vehicle, and selecting multiple candidate calibration parameters within a preset range including the calibration parameters to be corrected, the second detection frame is projected onto the plane where the first detection frame is located according to each candidate calibration parameter, and the third detection frame corresponding to each candidate calibration parameter is obtained, and the intersection and union ratio between each third detection frame and the first detection frame is calculated to obtain the intersection and union ratio corresponding to each of the candidate calibration parameters, and the calibration parameters to be corrected are updated according to the candidate calibration parameters corresponding to the intersection and union ratio that meets the preset conditions. Thus, the first detection frame is taken as the true value, and the updated calibration parameters are determined from the multiple candidate calibration parameters based on the intersection and union ratio between each third detection frame and the first detection frame, thereby realizing automatic correction of the calibration parameters without manual calibration. Compared with the manual calibration method, the cost of manual calibration is saved, the real-time performance and processing efficiency are improved, and the accuracy of the calibration parameters is ensured at the same time.
[0054] Based on the above embodiments, Figure 2 A flow chart of another vehicle calibration method provided by an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the method includes:
[0055] Step 201, input the target image captured by the camera into the pre-trained 2D object detection model for detection to obtain a first detection frame of the vehicle object in the target image, and input the point cloud data collected by the lidar into the pre-trained 3D object detection model for detection to obtain a second detection frame of the vehicle object.
[0056] In this embodiment, the current vehicle is provided with a camera and a laser radar. In order to reduce the influence of the motion state on the accuracy, when the camera and the laser radar collect data, the current vehicle and the surrounding vehicle objects are in a stationary state.
[0057] The process of training the 2D object detection model is as follows: obtain a first training sample, the first training sample includes a sample image labeled with a vehicle object, train a preset neural network model based on the first training sample, and obtain a 2D object detection model, the input of the 2D object detection model is an image, and the output is a detection box of the vehicle in the image. The process of training the 3D object detection model is as follows: obtain a second training sample, the second training sample includes point cloud data labeled with a vehicle object, train a preset neural network model based on the second training sample, and obtain a 3D object detection model, the input of the 3D object detection model is point cloud data within the acquisition range, and the output is a detection box of the vehicle within the acquisition range.
[0058] Step 202 : obtaining a calibration parameter to be corrected, and selecting a plurality of candidate calibration parameters within a preset range including the calibration parameter to be corrected.
[0059] In one embodiment of the present disclosure, after obtaining the calibration parameters to be corrected, the second detection frame can be projected onto the plane where the first detection frame is located according to the calibration parameters to be corrected to obtain a fourth detection frame corresponding to the calibration parameters to be corrected, and then, the intersection-and-union ratio between the fourth detection frame and the first detection frame is calculated. Furthermore, if the intersection-and-union ratio between the fourth detection frame and the first detection frame is greater than a threshold, it is determined that the calibration parameters to be corrected will not be updated. Otherwise, multiple candidate calibration parameters are selected within a preset range that includes the calibration parameters to be corrected.
[0060] In this embodiment, since the size of the intersection-and-union ratio is positively correlated with the accuracy of the calibration parameters, if the intersection-and-union ratio between the fourth detection frame and the first detection frame is greater than the threshold, it is considered that the accuracy of the calibration parameters to be corrected can meet the requirements, and the subsequent steps are not performed at this time, which can reduce the amount of calculation and improve the processing efficiency while ensuring accuracy. Among them, the specific implementation method of the steps involving the fourth detection frame can refer to the implementation method of the third detection frame part, which will not be repeated here.
[0061] Step 203 , according to each candidate calibration parameter, project the second detection frame of each target object onto the plane where the first detection frame is located, and obtain multiple third detection frames corresponding to each candidate calibration parameter.
[0062] In this embodiment, the number of target objects is multiple. For example, if the target image captured by the camera includes N vehicles, then the number of target objects is N. At this time, for each candidate calibration parameter, the second detection frames of the N vehicle objects are projected onto the plane where the first detection frame is located according to the candidate calibration parameter, and the third detection frames of the N vehicle objects corresponding to the candidate calibration parameter are obtained. Taking one of the vehicles as an example, refer to Figure 3 , Figure 3 The solid line frame is the first detection frame, and the dotted line frame is the third detection frame obtained by projecting the second detection frame according to the candidate calibration parameters. The positions of the dotted line frames are different due to different candidate calibration parameters.
[0063] Step 204 , calculating the intersection-and-union ratios between the first detection frame and the plurality of third detection frames corresponding to each candidate calibration parameter, to obtain the intersection-and-union ratio corresponding to each candidate calibration parameter.
[0064] In this embodiment, for each candidate calibration parameter, the intersection-and-union ratios between multiple third detection frames corresponding to the candidate calibration parameter and the first detection frame are calculated to obtain multiple intersection-and-union ratios, and statistical information of the multiple intersection-and-union ratios is calculated, wherein the statistical information is used as the intersection-and-union ratio corresponding to the candidate calibration parameter.
[0065] As an example, calculating statistical information of multiple intersection-and-union ratios includes: calculating the mean of multiple intersection-and-union ratios, wherein the mean is used as the intersection-and-union ratio corresponding to the candidate calibration parameter. In this example, for each candidate calibration parameter, N intersection-and-union ratios between the third detection frame and the first detection frame of the corresponding N vehicle objects are calculated, and the mean of the N intersection-and-union ratios is used as the intersection-and-union ratio corresponding to the candidate calibration parameter. Thus, an implementation method for determining the intersection-and-union ratio corresponding to each candidate calibration parameter for multiple target objects is provided. As the number of target objects increases, compared with the case of a single preset number, it is possible to more accurately reflect the gap between the third detection frame and the first detection frame of the target object under the candidate calibration parameter, reduce the impact of a single error, and thereby improve the accuracy of the calibration parameter.
[0066] It should be noted that the aforementioned statistical information is not limited to the mean, but may also be a weighted average, variance, etc., which is not limited here.
[0067] Step 205 , determining the maximum IoU ratio from among the IoU ratios corresponding to the multiple candidate calibration parameters, and updating the calibration parameter to be corrected according to the candidate calibration parameter corresponding to the maximum IoU ratio.
[0068] In this embodiment, taking candidate calibration parameters K1 and K2 as examples, the target objects are A and B. For candidate calibration parameter K1, the second detection frame with target object A is transformed by candidate calibration parameter K1 to obtain detection frame a1, and the second detection frame with target object B is transformed to obtain detection frame b1. The intersection and union ratio between detection frame a1 and the first detection frame and the intersection and union ratio between detection frame b1 and the first detection frame are calculated, and the average of the two is taken as the intersection and union ratio corresponding to K1. The intersection and union ratio corresponding to K2 is determined according to the same steps. Furthermore, if the intersection and union ratio corresponding to K1 is greater than the intersection and union ratio corresponding to K2, the calibration parameter to be corrected is updated according to K1.
[0069] According to the technical solution of the embodiment of the present disclosure, the first detection frame obtained by 2D object detection is taken as the true value, and the external parameters of the lidar and the camera are adjusted so that the IOU between the third detection frame projected onto the image by the second detection frame and the first detection frame is maximized, thereby realizing automatic correction of the external parameters of the lidar and the camera, saving the cost of manual calibration, improving real-time performance and processing efficiency, and being able to obtain more accurate calibration parameters, thereby providing more accurate training data for the vehicle-side algorithm.
[0070] The disclosed embodiment also provides a calibration device for a vehicle.
[0071] Figure 4 A schematic diagram of a vehicle calibration device provided by an embodiment of the present disclosure is shown in FIG. Figure 4As shown, the vehicle calibration device includes: a detection module 41, an acquisition module 42, a projection module 43, a determination module 44, and an update module 45.
[0072] The detection module 41 is used to obtain a first detection frame and a second detection frame of a target object around the vehicle, wherein the first detection frame is obtained by 2D object detection and the second detection frame is obtained by 3D object detection;
[0073] An acquisition module 42, used for acquiring a calibration parameter to be corrected, and selecting a plurality of candidate calibration parameters within a preset range including the calibration parameter to be corrected;
[0074] A projection module 43, configured to project the second detection frame onto the plane where the first detection frame is located according to each of the candidate calibration parameters, to obtain a third detection frame corresponding to each of the candidate calibration parameters;
[0075] A determination module 44 is used to calculate an intersection-and-union ratio between each third detection frame and the first detection frame to obtain an intersection-and-union ratio corresponding to each of the candidate calibration parameters;
[0076] The updating module 45 is used to update the calibration parameters to be corrected according to the candidate calibration parameters corresponding to the intersection-over-union ratios that meet the preset conditions.
[0077] In one embodiment of the present disclosure, a vehicle is provided with a camera and a lidar, and the detection module 41 is specifically used to: input the target image captured by the camera into a pre-trained 2D object detection model for detection, and obtain a first detection frame of the vehicle object in the target image; input the point cloud data captured by the lidar into a pre-trained 3D object detection model for detection, and obtain a second detection frame of the vehicle object.
[0078] In one embodiment of the present disclosure, the acquisition module 42 is specifically used to: convert the calibration parameters to be corrected into the form of Euler angles to obtain an initial yaw angle, an initial pitch angle, and an initial roll angle; with the initial yaw angle, the initial pitch angle, and the initial roll angle as the center, within a preset angle range, determine a plurality of candidate yaw angles, a plurality of candidate pitch angles, and a plurality of candidate roll angles according to a preset angle step; perform format conversion based on the plurality of candidate yaw angles, the plurality of candidate pitch angles, and the plurality of candidate roll angles to generate the plurality of candidate calibration parameters.
[0079] In one embodiment of the present disclosure, there are multiple target objects, and each candidate calibration parameter corresponds to multiple third detection frames. The determination module 44 is specifically used to: for each candidate calibration parameter, calculate the intersection-and-union ratios between the multiple third detection frames corresponding to the candidate calibration parameter and the first detection frame to obtain multiple intersection-and-union ratios; calculate statistical information of the multiple intersection-and-union ratios, wherein the statistical information is used as the intersection-and-union ratio corresponding to the candidate calibration parameter.
[0080] In one embodiment of the present disclosure, the determination module 44 is specifically used to: calculate the mean of the multiple intersection-and-union ratios, wherein the mean is used as the intersection-and-union ratio corresponding to the candidate calibration parameter.
[0081] In one embodiment of the present disclosure, the following steps are performed to determine whether the intersection-and-union ratio satisfies the preset condition: determine the maximum intersection-and-union ratio from among the intersection-and-union ratios corresponding to multiple candidate calibration parameters; determine that the maximum intersection-and-union ratio satisfies the preset condition; and / or determine an intersection-and-union ratio greater than a preset threshold from among the intersection-and-union ratios corresponding to multiple candidate calibration parameters; determine that the intersection-and-union ratio greater than the preset threshold satisfies the preset condition.
[0082] The vehicle calibration device provided in the embodiment of the present disclosure can execute any vehicle calibration method provided in the embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. For the contents not described in detail in the embodiment of the device of the present disclosure, reference can be made to the description in any method embodiment of the present disclosure.
[0083] An embodiment of the present disclosure also provides an electronic device, which includes one or more processors and a memory.
[0084] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0085] The memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on a computer-readable storage medium, and a processor may run the program instructions to implement the method of the embodiments of the present disclosure above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0086] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected through a bus system and / or other forms of connection mechanisms. In addition, the input device may also include, for example, a keyboard, a mouse, etc. The output device may output various information to the outside, including determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.
[0087] Of course, for simplicity, only some of the components in the electronic device related to the present disclosure are shown, omitting components such as a bus, an input / output interface, etc. In addition, the electronic device may further include any other appropriate components according to specific application scenarios.
[0088] In addition to the above methods and devices, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes any method provided by the embodiments of the present disclosure.
[0089] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0090] In addition, the embodiments of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes any method provided by the embodiments of the present disclosure.
[0091] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0092] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0093] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A calibration method for a vehicle, characterized in that: include: Acquire a first detection frame and a second detection frame of a target object around the vehicle, wherein the first detection frame is obtained by 2D object detection, and the second detection frame is obtained by 3D object detection; Acquire a calibration parameter to be corrected, and select a plurality of candidate calibration parameters within a preset range including the calibration parameter to be corrected; According to each of the candidate calibration parameters, projecting the second detection frame onto the plane where the first detection frame is located, to obtain a third detection frame corresponding to each of the candidate calibration parameters; Calculating an intersection-and-union ratio between each third detection frame and the first detection frame to obtain an intersection-and-union ratio corresponding to each of the candidate calibration parameters; The calibration parameters to be corrected are updated according to the candidate calibration parameters corresponding to the intersection-over-union ratios that meet the preset conditions.
2. The method according to claim 1, characterized in that The vehicle is provided with a camera and a laser radar, and the obtaining of a first detection frame and a second detection frame of a target object around the vehicle includes: Inputting the target image captured by the camera into a pre-trained 2D object detection model for detection to obtain a first detection frame of the vehicle object in the target image; The point cloud data collected by the laser radar is input into a pre-trained 3D object detection model for detection to obtain a second detection frame of the vehicle object.
3. The method according to claim 1, characterized in that The step of selecting a plurality of candidate calibration parameters within a preset range including the calibration parameter to be corrected comprises: Convert the calibration parameters to be corrected into Euler angles to obtain an initial yaw angle, an initial pitch angle, and an initial roll angle; Taking the initial yaw angle, initial pitch angle and initial roll angle as the center, within a preset angle range, determine a plurality of candidate yaw angles, a plurality of candidate pitch angles and a plurality of candidate roll angles according to a preset angle step size; Format conversion is performed based on the multiple candidate yaw angles, the multiple candidate pitch angles, and the multiple candidate roll angles to generate the multiple candidate calibration parameters.
4. The method according to claim 1, characterized in that There are multiple target objects, each of the candidate calibration parameters corresponds to multiple third detection frames, and calculating the intersection-and-union ratio between each third detection frame and the first detection frame to obtain the intersection-and-union ratio corresponding to each of the candidate calibration parameters includes: For each of the candidate calibration parameters, calculating the intersection-and-union ratios between a plurality of third detection frames corresponding to the candidate calibration parameter and the first detection frame to obtain a plurality of intersection-and-union ratios; Calculate statistical information of the multiple intersection-and-union ratios, wherein the statistical information serves as the intersection-and-union ratio corresponding to the candidate calibration parameter.
5. The method according to claim 4, characterized in that The calculating of the statistical information of the plurality of intersection-over-union ratios includes: The average of the multiple intersection-and-union ratios is calculated, wherein the average is used as the intersection-and-union ratio corresponding to the candidate calibration parameter.
6. The method according to claim 1, characterized in that Determine that the intersection-over-combination ratio satisfies the preset condition by the following steps: Determine the maximum intersection-over-union ratio from the intersection-over-union ratios corresponding to the multiple candidate calibration parameters; Determining that the maximum intersection-over-combination ratio satisfies the preset condition; and / or, Determine an intersection-and-union ratio greater than a preset threshold from among the intersection-and-union ratios corresponding to the plurality of candidate calibration parameters; It is determined that the intersection-over-union ratio greater than the preset threshold satisfies the preset condition.
7. A calibration device for a vehicle, characterized in that: include: A detection module, used to obtain a first detection frame and a second detection frame of a target object around the vehicle, wherein the first detection frame is obtained by 2D object detection and the second detection frame is obtained by 3D object detection; An acquisition module, used for acquiring the calibration parameters to be corrected, and selecting a plurality of candidate calibration parameters within a preset range including the calibration parameters to be corrected; a projection module, configured to project the second detection frame onto a plane where the first detection frame is located according to each of the candidate calibration parameters, so as to obtain a third detection frame corresponding to each of the candidate calibration parameters; A determination module, configured to calculate an intersection-and-union ratio between each third detection frame and the first detection frame to obtain an intersection-and-union ratio corresponding to each of the candidate calibration parameters; The updating module is used to update the calibration parameters to be corrected according to the candidate calibration parameters corresponding to the intersection-over-union ratio that meets the preset conditions.
8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the vehicle calibration method described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the calibration method for a vehicle described in any one of claims 1 to 6 is implemented.
10. A vehicle, characterized in that: include: The device as claimed in claim 7, or the electronic device as claimed in claim 8.