Target detection model training method, device, electronic device and readable storage medium
By correcting the anchor box height according to the target category and real anchor box parameters in the point cloud algorithm, the inaccurate target box position caused by the default setting of anchor center point is solved, and the target detection accuracy is improved.
Patent Information
- Application Number
- CN202111617562.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-27
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2041-12-27
AI Technical Summary
In the existing anchor-based point cloud algorithm, the anchor's center point height is set to the same horizontal plane by default, resulting in the predicted target box position inaccurate and the training model target detection accuracy is insufficient.
By obtaining the predicted anchor box height function according to the predicted target category, combining the distance parameters and height parameters of the real anchor box, correcting the height parameters of the predicted anchor box, and updating the model parameters through backpropagation of the loss value, improving the accuracy of the anchor box.
The accuracy and detection accuracy of the target detection model in the target box position is improved, and the target detection capability of the model is enhanced.
Smart Images

Figure CN114429571B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of target detection, and in particular to a target detection model training method, device, electronic device and readable storage medium. Background Art
[0002] Point cloud 3D object detection is currently widely used in fields requiring target detection, such as autonomous driving and robotic navigation. Most current object detection algorithms are based on point cloud algorithms using anchor boxes. Anchor-based algorithms generate dense prediction boxes (anchor boxes), enabling the model to directly perform object classification and bounding box coordinate regression based on these boxes. Dense anchor boxes can effectively improve object recall. The size and center point coordinates of the anchors are crucial for bounding box position regression. Accurate center point coordinates help the model regress the predicted object box to the correct position, thereby achieving relatively high accuracy.
[0003] However, in the current anchor-based point cloud algorithm, the center point height of the anchor is set to the same horizontal plane by default, which leads to inaccurate predicted target box positions and insufficient target detection accuracy of the trained model. Summary of the Invention
[0004] The main purpose of this application is to provide a target detection model training method, device, electronic device and readable storage medium, aiming to solve the problem that in the previous anchor-based point cloud algorithm, the center point height of the anchor is set to the same horizontal plane by default, which leads to inaccurate predicted target frame position and insufficient target detection accuracy of the trained model.
[0005] In the first aspect, the present application provides a target detection model training method, including: inputting point cloud data into the model to be trained to obtain multiple prediction anchor frames, each prediction anchor frame corresponds to a predicted target category, and the height parameter of the prediction anchor frame is obtained based on the predicted target category; according to the predicted anchor frame, the predicted target category, the true anchor frame and the true target category, the model parameters of the prediction model to be trained are updated to obtain the trained prediction model.
[0006] In some implementations, the height parameter includes the height of the center point of the anchor frame or the height of the center point of the bottom surface of the anchor frame.
[0007] Inputting point cloud data into the model to be trained, multiple predicted anchor boxes are obtained. This includes: obtaining a corresponding predicted anchor box height function based on the predicted target category. The predicted anchor box height function is derived from the distance and height parameters of the real anchor box; obtaining a distance parameter for the predicted anchor box. The distance parameter is the component of the distance between the point cloud corresponding to the anchor box and the acquisition device that collected the point cloud data, in the direction of the acquisition device's movement; and determining a revised height parameter for the predicted anchor box based on the predicted anchor box height function and the predicted anchor box distance parameter. Based on the revised height parameter, the predicted anchor box is output.
[0008] In some implementations, obtaining a corresponding predicted anchor box height function based on the predicted target category includes obtaining a distance parameter and a height parameter of a real anchor box corresponding to each target category. Based on the distance parameter and height parameter of each real anchor box, a predicted anchor box height function corresponding to each target category is fitted, where the predicted anchor box height function represents a functional relationship between the distance parameter and the height parameter of the predicted anchor box.
[0009] In some implementations, updating the model parameters of a model to be trained based on the predicted anchor boxes, the predicted object categories, the true anchor boxes, and the true object categories to obtain a trained prediction model includes: calculating the intersection-over-union (IoU) of the anchor boxes based on the predicted anchor boxes and the true anchor boxes; obtaining a loss value based on the predicted object categories and the true object categories and the IoU; and backpropagating the loss value to update the model parameters of the model to be trained to obtain a trained prediction model.
[0010] In a second aspect, the present application provides a target detection model training device, comprising: a prediction module for inputting point cloud data into a model to be trained to obtain multiple predicted anchor boxes, each of which corresponds to a predicted target category, and the height parameters of the predicted anchor boxes are obtained based on the predicted target category. A training module for updating the model parameters of the prediction model to be trained based on the predicted anchor boxes, the predicted target category, the true anchor boxes, and the true target category to obtain a trained prediction model.
[0011] In some embodiments, the height parameter includes the height of the center point of the anchor frame or the height of the center point of the bottom surface of the anchor frame. The prediction module is specifically configured to obtain a corresponding predicted anchor frame height function based on the predicted target category. The predicted anchor frame height function is obtained based on the distance parameter and height parameter of the actual anchor frame. The distance parameter of the predicted anchor frame is obtained. The distance parameter is the component of the distance between the point cloud corresponding to the anchor frame and the acquisition device that acquired the point cloud data in the direction of movement of the acquisition device. The corrected height parameter of the predicted anchor frame is determined based on the predicted anchor frame height function and the distance parameter of the predicted anchor frame. The predicted anchor frame is output based on the corrected height parameter.
[0012] In some implementations, the prediction module is specifically configured to obtain the distance parameter and height parameter of the real anchor box corresponding to each target category. Based on the distance parameter and height parameter of each target category, a predicted anchor box height function corresponding to each target category is fitted. The predicted anchor box height function is used to represent the functional relationship between the distance parameter and the height parameter.
[0013] In some embodiments, the training module is specifically configured to calculate the intersection-over-union (IoU) of the anchor boxes based on the predicted anchor boxes and the true anchor boxes. A loss value is obtained based on the predicted object category, the true object category, and the IoU. The model parameters of the model to be trained are backpropagated based on the loss value to obtain a trained prediction model.
[0014] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the method provided in the first aspect is implemented when the processor executes the computer program.
[0015] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and is characterized in that when the computer program is executed by a processor, it implements the method provided in the first aspect.
[0016] The target detection model training method provided in this application first inputs point cloud data into the model to be trained, then determines the height parameters of the predicted anchor box based on the predicted target category, and the predicted anchor box is output by the model to be trained. Then, based on the obtained predicted anchor box, the predicted target category, the true anchor box, and the true target category, the model parameters of the model to be trained are updated. Since the height parameters of the predicted anchor box are more accurate during training, the target box position of the trained prediction model during target detection is more accurate, and the target detection accuracy is effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0018] Figure 1 A flowchart of a target detection model training method provided in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of the steps for obtaining height parameters in a target detection model training method provided in an embodiment of the present application;
[0020] Figure 3A schematic block diagram of an object detection model training device provided in an embodiment of the present application;
[0021] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0022] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0024] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.
[0025] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.
[0026] Figure 1 The flowchart of a target detection model training method provided in an embodiment of the present application is shown in FIG. The target detection model training method provided in the present application can be applied to electronic devices that support model training, such as laptops, desktop computers, servers, etc.
[0027] In some implementations, please refer to Figure 1 , the target detection model training method includes:
[0028] S110: Input the point cloud data into the model to be trained to obtain multiple predicted anchor boxes.
[0029] In some embodiments, point cloud data can be acquired by transmitting a signal and receiving an echo signal from a laser radar. Point cloud data can be acquired by a laser radar or from a dataset.
[0030] As an example, point cloud data can be obtained from the KITTI dataset, which is often used for autonomous driving related training. It includes point cloud data acquired by a lidar and target categories corresponding to the point cloud data. The target categories may include cars (Car), cyclists (Cyclist), and pedestrians (Pedstrain) and other categories. In this application, the target categories include Car, Cyclist, and Pedstrain as an example. The target corresponding to each point cloud data includes a real anchor frame. The parameters of the real anchor frame include the target category label, anchor frame position, anchor frame size, anchor frame angle, etc. The anchor frame position is used to display the position of the target in the point cloud data. The anchor frame position (height parameter) may include the center point coordinates of the anchor frame or the bottom center point coordinates of the anchor frame.
[0031] In some implementations, the prediction model to be trained may be a voxel region convolutional neural network (Voxel-R-CNN).
[0032] As an example, Voxel-R-CNN may include the following process:
[0033] (1) Perform data enhancement on the input point cloud data. For example, the input point cloud data can be rotated, translated, or flipped to make the recognition more accurate.
[0034] (2) The point cloud data after data enhancement is voxelized. For example, the range of the input point cloud data is [0, -35.2, -1, 70.4, 35.2, 3] (unit: m), so the detection range of x (the direction of the car's movement) is [0, 70.4], the detection range of y (horizontal direction) is [-35.2, 35.2], and the detection range of z (height direction) is [-1, 3]. The size of each voxel is [0.05, 0.05, 0.1], so the data dimension after voxelization is [1408, 1408, 40].
[0035] (3) Feature extraction is performed on the voxelized point cloud data through the 3D backbone network. For example, the 3D backbone network mainly includes sparse convolution and submanifold convolution. During convolution, feature extraction and downsampling of the data are performed. The dimension of the sampled 3D feature data is [batch_size, 128, 2, 176, 176], where batch_size refers to the number of frames of the point cloud processed each time.
[0036] (4) Convert 3D features to 2D features. This step converts 3D features to 2D features, and the output 2D feature size is [batch_size, 256, 176, 176].
[0037] (5) The 2D feature data is further extracted and regressed using the 2D backbone network and the Region Proposal Network (RPN) to generate cls (target category) and predicted anchor box (BBox) information. The output dimension of cls is [batch_size, 185856, 3], where 185856 is the number of targets predicted in a frame of point cloud. Since each point in the 2D feature predicts 3 categories and each category has 2 angles, a total of 6 predicted anchor boxes, the feature map of size [176, 176] predicts a total of 185856 predicted anchor boxes (176*176*6). During training, there are 3 categories (car, Cyclist, Pedstrain). The 3 in the above dimension represents the confidence level that the target category in the predicted anchor box is car, Cyclist, or Pedstrain. The output dimension of the BBox is [batch_size, 185856, 7], where 185856 is the number of objects predicted in a frame of point cloud, and 7 represents the seven features of the predicted anchor box: the length, width, height, center point coordinates (x, y, z), and angle information of the predicted anchor box. The center point coordinates can also be replaced by the bottom coordinates, but this is not limited to this.
[0038] (6) Calculate the loss value and back propagate. For example, the 185,856 predicted anchor boxes generated in the previous step are filtered to select a specified number of targets. Then, based on the category of the target in the predicted anchor box and the true category of the target, the loss value is calculated using the loss function. When calculating the loss value, the intersection-over-union ratio of the predicted anchor box and the true anchor box is calculated (i.e., the ratio of the intersection and union of the predicted anchor box and the true anchor box). After obtaining the loss value, the optimizer is updated and back propagated for the next round of learning.
[0039] In some embodiments, in the example of S110, when executing step (5) and obtaining the height parameters (center point coordinates or bottom center point coordinates) of the predicted anchor boxes among the 7 features of 185,856 predicted anchor boxes, the height parameters of each predicted anchor box can be obtained according to the predicted target category to obtain 185,856 predicted anchor boxes.
[0040] Figure 2 A schematic diagram of the steps for obtaining height parameters in a target detection model training method provided in an embodiment of the present application.
[0041] In some implementations, when obtaining the height parameter of each predicted anchor box, you can refer to Figure 2 The steps shown in .
[0042] refer to Figure 2 , the steps to obtain the height parameters include:
[0043] S111. According to the predicted target category, obtain the corresponding predicted anchor box height function.
[0044] In some implementations, the distance parameter and height parameter of the real anchor box corresponding to each target category can be obtained first. Then, based on the distance parameter and height parameter of the real anchor box of each target category, the predicted anchor box height function corresponding to each target category is fitted. The predicted anchor box height function is used to represent the functional relationship between the distance parameter and the height parameter of the predicted anchor box. The height parameter includes the height of the center point or the bottom center point of the anchor box, and the distance parameter is the component of the distance between the point cloud corresponding to the real anchor box and the lidar that collected the point cloud in the direction of movement of the lidar.
[0045] As an example, the predicted anchor box height function can be obtained by fitting the distance parameter of each target category to the height of the center point of the anchor box using the least squares method, or by fitting the distance parameter of each target category to the height of the center point of the bottom surface of the anchor box using the least squares method. The obtained predicted anchor box height function can be expressed by the following formula:
[0046] height=k*distance+b
[0047] Where height is the height of the center point of the anchor box of the target category or the height of the center point of the anchor box bottom surface, distance is the distance parameter, and k and b are the coefficients obtained after fitting. For example, based on the point cloud data in the KITTI dataset, the parameters of k and b for fitting different categories of distance and height parameters can be referred to Table 1:
[0048] Table 1
[0049]
[0050] For the point cloud data in the KITTI dataset, the predicted anchor box height function for the Car category includes the height function of the anchor box center point height = 0.0075 * distance - 0.7655 and the height function of the anchor box bottom center point height = 0.0074 * distance - 1.7264. The predicted anchor box height function for the Cyclist category includes the height function of the anchor box center point height = 0.0037 * distance - 0.7128 and the height function of the anchor box bottom center point height = 0.0036 * distance - 1.5799. The predicted anchor box height function for the Pedstrain category includes the height function of the anchor box center point height = 0.0090 * distance - 0.7402 and the height function of the anchor box bottom center point height = 0.0083 * distance - 1.6080.
[0051] S112. Obtain the distance parameter of the predicted anchor box.
[0052] S113. Obtain a height parameter of the predicted anchor box according to the predicted anchor box height function and the distance parameter of the predicted anchor box.
[0053] In some embodiments, each predicted anchor frame corresponds to a set of point cloud data, which includes the distance between each point cloud and the laser radar that collected the point cloud in the direction of movement of the laser radar. This distance can be used as the distance parameter of the predicted anchor frame.
[0054] Then, referring to the multiple predicted anchor box height functions obtained in S111, the height function to be used is determined based on the target category and the height parameter category. For example, if the target category is car and the height parameter is the height of the anchor box center point, the height function is: height = 0.0075 * distance - 0.7655. Substituting the distance parameter of the predicted anchor box into the height function, the height parameter of the predicted anchor box can be obtained.
[0055] S114. Output the predicted anchor box based on the height parameter.
[0056] In some implementations, when the prediction model is initialized, the height parameter of the predicted anchor frame is set to a uniform fixed value. For example, for point cloud data in the KITTI dataset, the bottom center height is generally set to -1.78 meters, and the target frame center height is set to -1 meter. However, due to the hardware characteristics of the lidar, as the distance increases, the lidar spot will continue to grow larger, and the echo signal will return to the part with the highest intensity. This will cause the distance to the distant target to increase as the distance increases, resulting in the center point height or bottom height of the target frame to become higher. Therefore, during prediction, it is also necessary to perform height correction on the predicted anchor frame so that the height of the predicted anchor frame is as close as possible to that of the target frame.
[0057] In some embodiments, referring to step 5 in S110, the numerical value of the height coordinate of the center point coordinate or the bottom center point coordinate of each predicted anchor frame can be obtained according to the predicted anchor frame height function, and the predicted anchor frame can be obtained according to the numerical output of the height coordinate of the center point coordinate or the bottom center point coordinate of the predicted anchor frame.
[0058] S120 , updating the model parameters of the prediction model to be trained according to the predicted anchor box, the predicted target category, the true anchor box, and the true target category to obtain a trained prediction model.
[0059] In some implementations, the intersection-over-union (IoU) of the anchor boxes can be calculated based on the predicted anchor boxes and the true anchor boxes. A loss function is then derived based on the predicted and true object categories and the IoU. Finally, the model parameters of the trained model are updated using the loss function through backpropagation, resulting in a trained prediction model.
[0060] The IoU ratio (IoU) refers to the ratio of the intersection and union of the areas of the predicted anchor box and the true anchor box. The higher the overlap between the predicted anchor box and the true anchor box, the closer the IoU ratio is to 1, and the better the prediction accuracy of the trained prediction model. Calculating the IoU ratio based on the corrected predicted anchor box can bring it closer to 1, thereby improving the prediction accuracy of the trained prediction model.
[0061] Figure 3 A schematic block diagram of a target detection model training device provided in an embodiment of the present application.
[0062] refer to Figure 3 , target detection model training device, including:
[0063] The prediction module 21 is used to input the point cloud data into the model to be trained to obtain multiple predicted anchor boxes, each of which corresponds to a predicted target category, and the height parameter of the predicted anchor box is obtained according to the predicted target category.
[0064] The training module 22 is used to update the model parameters of the prediction model to be trained according to the predicted anchor box, the predicted target category, the real anchor box and the real target category to obtain a trained prediction model.
[0065] In some implementations, the height parameter includes the height of the center point of the anchor frame or the height of the center point of the bottom surface.
[0066] Prediction module 21 is specifically configured to obtain a predicted anchor box height function based on the predicted target category. The predicted anchor box height function is obtained based on the distance parameter and height parameter of the actual anchor box. The predicted anchor box distance parameter is obtained, which is the component of the distance between the point cloud corresponding to the anchor box and the acquisition device that collected the point cloud data, in the direction of the acquisition device's movement. A revised height parameter of the predicted anchor box is determined based on the predicted anchor box height function and the predicted anchor box distance parameter. Based on the revised height parameter, the predicted anchor box is output.
[0067] In some implementations, the prediction module 21 is specifically configured to obtain the distance parameter and height parameter of the true anchor box corresponding to each target category. Based on the true anchor box distance parameter and height parameter of each target category, a predicted anchor box height function corresponding to each target category is fitted. The predicted anchor box height function is used to represent the functional relationship between the distance parameter and the height parameter of the predicted anchor box.
[0068] In some embodiments, the training module 22 is specifically configured to calculate the intersection-over-union (IoU) of the anchor boxes based on the predicted anchor boxes and the true anchor boxes. A loss value is obtained based on the predicted object class, the true object class, and the IoU. The model parameters of the model to be trained are then backpropagated based on the loss value to obtain a trained prediction model.
[0069] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned target detection model training method embodiment, and will not be repeated here.
[0070] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0071] like Figure 4 As shown, the electronic device includes: a processor 31, a computer-readable storage medium 32 and a bus 33, wherein:
[0072] The electronic device may include one or more processors 31, a bus 33 and a storage medium 32, wherein the storage medium 32 is used to store machine-readable instructions, the processor 31 is communicatively connected to the storage medium 32 via the bus 33, and the processor 31 executes the machine-readable instructions stored in the storage medium 32 to execute the above-mentioned method embodiment.
[0073] The electronic device may be a general-purpose computer, a server, or a mobile terminal, etc., which is not limited here. The electronic device is used to implement the above-mentioned method embodiment of the present application.
[0074] It should be noted that the processor 31 may include one or more processing cores (e.g., a single-core processor or a multi-core processor). By way of example only, the processor may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), an application-specific instruction set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a controller, a microcontroller unit, a reduced instruction set computer (RISC), or a microprocessor, or any combination thereof.
[0075] The storage medium 32 may include: a mass storage device, a removable storage device, a volatile read-write memory, or a read-only memory (ROM), or any combination thereof. For example, the mass storage device may include a magnetic disk, an optical disk, a solid-state drive, or the like; the removable storage device may include a flash drive, a floppy disk, an optical disk, a memory card, a zip disk, a magnetic tape, or the like; the volatile read-write memory may include a random access memory (RAM); the RAM may include dynamic random access memory (DRAM), double data rate synchronous dynamic RAM (DDR SDRAM); static random access memory (SRAM), thyristor-based random access memory (T-RAM), and zero-capacitor RAM (Zero-RAM), or the like. As an example, ROM may include mask ROM (Mask Read-Only Memory, MROM), programmable ROM (Programmable Read-Only Memory, PROM), erasable programmable ROM (Programmable Erasable Read-only Memory, PEROM), electrically erasable programmable ROM (Electrically Erasable Programmable read only memory, EEPROM), compact disc ROM (CD-ROM), and digital versatile disk ROM, etc.
[0076] For ease of explanation, only one processor 31 is described in the electronic device. However, it should be noted that the electronic device in this application may also include multiple processors 31, so the steps performed by one processor described in this application may also be performed jointly or individually by multiple processors. For example, if the processor 31 of the electronic device performs step A and step B, it should be understood that step A and step B may also be performed jointly by two different processors or individually in one processor. For example, the first processor performs step A and the second processor performs step B, or the first processor and the second processor perform steps A and B together.
[0077] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various method embodiments can be implemented.
[0078] An embodiment of the present application provides a computer program product. When the computer program product is run on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned various method embodiments when executing the computer program product.
[0079] An embodiment of the present application provides a chip system, which includes a memory and a processor. The processor executes a computer program stored in the memory to implement the steps in the above-mentioned various method embodiments.
[0080] An embodiment of the present application provides a chip system, which includes a processor coupled to a computer-readable storage medium. The processor executes a computer program stored in the computer-readable storage medium to implement the steps in the above-mentioned method embodiments.
[0081] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0082] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments. The above description is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A target detection model training method, characterized in that: include: Input the point cloud data into the model to be trained to obtain multiple predicted anchor boxes, each of which corresponds to a predicted target category, and the height parameter of the predicted anchor box is obtained according to the predicted target category; updating the model parameters of the prediction model to be trained according to the predicted anchor box, the predicted target category, the real anchor box, and the real target category to obtain a trained prediction model; The method for obtaining the height parameter of the predicted anchor frame includes: Obtain the distance parameters and height parameters of the real anchor box corresponding to each target category; According to the distance parameter and height parameter of each of the real anchor boxes, a predicted anchor box height function corresponding to each of the target categories is fitted, where the predicted anchor box height function is used to represent the functional relationship between the distance parameter and the height parameter of the predicted anchor box; Obtaining a distance parameter of the predicted anchor frame, where the distance parameter is a component of the distance between the point cloud corresponding to the anchor frame and the acquisition device that acquires the point cloud data in the moving direction of the acquisition device; A height parameter of the predicted anchor box is determined according to the predicted anchor box height function and the distance parameter of the predicted anchor box.
2. The method according to claim 1, characterized in that The height parameter includes the height of the center point of the anchor frame or the height of the center point of the bottom surface of the anchor frame; The point cloud data is input into the model to be trained to obtain multiple predicted anchor frames, including: According to the height parameter of the predicted anchor box, the predicted anchor box is output.
3. The method according to any one of claims 1-2, characterized in that The method includes updating the model parameters of the model to be trained according to the predicted anchor box, the predicted target category, the real anchor box, and the real target category to obtain a trained prediction model, including: Calculate the intersection-over-union ratio of the anchor frame according to the predicted anchor frame and the real anchor frame; Obtaining a loss value according to the predicted target category, the true target category, and the intersection-over-union ratio; According to the back propagation of the loss value, the model parameters of the model to be trained are updated to obtain a trained prediction model.
4. A target detection model training device, characterized in that: include: A prediction module is used to input point cloud data into the model to be trained to obtain multiple predicted anchor boxes, each of which corresponds to a predicted target category, and the height parameter of the predicted anchor box is obtained according to the predicted target category; A training module, configured to update the model parameters of the prediction model to be trained according to the predicted anchor box, the predicted target category, the actual anchor box, and the actual target category to obtain a trained prediction model; The prediction module is specifically used to obtain the distance parameter and height parameter of the real anchor box corresponding to each target category; According to the distance parameter and height parameter of each of the real anchor boxes, a predicted anchor box height function corresponding to each of the target categories is fitted, where the predicted anchor box height function is used to represent the functional relationship between the distance parameter and the height parameter of the predicted anchor box; Obtaining a distance parameter of the predicted anchor frame, where the distance parameter is a component of the distance between the point cloud corresponding to the anchor frame and the acquisition device that acquires the point cloud data in the moving direction of the acquisition device; A height parameter of the predicted anchor box is determined according to the predicted anchor box height function and the distance parameter of the predicted anchor box.
5. The device according to claim 4, characterized in that The height parameter includes the height of the center point of the anchor frame or the height of the center point of the bottom surface of the anchor frame; The prediction module is specifically configured to output a predicted anchor box according to a height parameter of the predicted anchor box.
6. The device according to any one of claims 4-5, characterized in that The training module is specifically configured to calculate the intersection-over-union ratio of the anchor frame based on the predicted anchor frame and the real anchor frame; Obtaining a loss value according to the predicted target category, the true target category, and the intersection-over-union ratio; According to the back propagation of the loss value, the model parameters of the model to be trained are updated to obtain a trained prediction model.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
A target detection method for improving category imbalance
CN110210482A
Training method, target detection method, medium and electronic equipment
CN112418344A