Image recognition method, device, electronic device and computer readable medium
By reading point cloud images from lidar, building voxel grids and projecting them into the grid, combining fragmentation processing and feature extraction, the image overlap problem caused by point cloud projection is solved, and the accuracy of obstacle recognition is improved. Supports accurate object recognition and vehicle control of autonomous vehicles.
Patent Information
- Application Number
- CN202110974348.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-24
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2041-08-24
AI Technical Summary
During autonomous driving, when point clouds are projected to RGB images, it is easy to cause image overlap, resulting in inaccurate identification of obstacles.
Read point cloud images from lidar, build voxel grids, and project them into the grid to generate bird's eye view. After fragmentation processing, input a pre-trained point cloud image recognition model, and use preset perturbation probability to perform features Extract and pool processing to generate aggregated feature maps to achieve image recognition.
It effectively solves the problem of image overlap, improves the accuracy of obstacle recognition, and ensures that autonomous vehicles can accurately identify objects and control vehicles during driving.
Smart Images

Figure CN113673446B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to an image recognition method, device, electronic device, and computer-readable medium. Background Art
[0002] At present, in the process of autonomous driving, the method usually adopted to identify surrounding obstacles is to project multiple frames of continuous point clouds onto corresponding RGB images respectively, and then use the optical flow method to identify objects (obstacles) on the image.
[0003] However, when the above method is used, the following technical problems usually occur: the image obtained by projecting the point cloud onto the RGB image is a conical image, which easily causes the projected images to overlap and the object cannot be accurately identified. Summary of the invention
[0004] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0005] Some embodiments of the present disclosure propose image recognition methods, devices, electronic devices, and computer-readable media to solve the technical problems mentioned in the above background technology section.
[0006] In a first aspect, some embodiments of the present disclosure provide an image recognition method, which includes: reading a point cloud image from a laser radar as a target point cloud image; constructing a voxel grid according to the radar coordinate system of the above-mentioned laser radar; projecting the above-mentioned target point cloud image into the above-mentioned voxel grid to generate a target bird's-eye view; fragmenting the above-mentioned target bird's-eye view to obtain a fragment image group; and inputting the above-mentioned fragment image group into a pre-trained point cloud image recognition model according to a preset disturbance probability to obtain an image recognition result.
[0007] Optionally, the above-mentioned fragment image group is input into a pre-trained point cloud image recognition model according to a preset disturbance probability to obtain an image recognition result, including: according to the above-mentioned preset disturbance probability, each fragment image in the above-mentioned fragment image group is perturbed to generate a fragment disturbance image, and obtain a fragment disturbance image group; each fragment disturbance image in the above-mentioned fragment disturbance image group is subjected to feature extraction processing to generate a fragment feature image, and obtain a fragment feature image group; each fragment feature image in the above-mentioned fragment feature image group is subjected to pooling processing to generate a fragment pooling feature image, and obtain a fragment pooling feature image group; the fragment pooling feature images included in the above-mentioned fragment pooling feature image group are subjected to feature aggregation processing to obtain an aggregated feature image.
[0008] Optionally, the above-mentioned inputting the above-mentioned fragment image group into a pre-trained point cloud image recognition model to obtain an image recognition result also includes: decoding the above-mentioned aggregated feature map to generate a decoded map as the image recognition result.
[0009] Optionally, the above-mentioned pooling processing is performed on each fragment feature map in the above-mentioned fragment feature map group to generate a fragment pooling feature map, including: pooling processing is performed on the above-mentioned fragment feature map to generate a fragment pooling sub-feature map group; and splicing the fragment pooling sub-feature maps included in the above-mentioned fragment pooling sub-feature map group to generate a fragment pooling feature map.
[0010] Optionally, the point cloud image recognition model is trained through the following steps: projecting the point cloud image into the voxel grid to generate a bird's-eye view as a sample image; inputting the sample image into the network model to be trained to obtain a sample reconstruction image; based on a preset loss function, determining the error value between the pixel values of the pixel points included in the sample image and the pixel values corresponding to the pixel points included in the sample reconstruction image; in response to the error value being greater than or equal to a preset threshold, adjusting the network parameters in the network model to be trained.
[0011] Optionally, the above steps also include: in response to the error value being less than the preset threshold, determining the network model to be trained as a point cloud image recognition model.
[0012] Optionally, in response to the error value being greater than or equal to a preset threshold, adjusting the network parameters in the network model to be trained includes: in response to the error value being greater than or equal to the preset threshold, recording the number of training times of the network model to be trained; in response to the number of training times satisfying a preset adjustment condition, adjusting the disturbance probability of the random perturbation module in the network model to be trained.
[0013] In a second aspect, some embodiments of the present disclosure provide an image recognition device, comprising: a reading unit, configured to read a point cloud image from a laser radar as a target point cloud image; a construction unit, configured to construct a voxel grid according to a radar coordinate system of the above-mentioned laser radar; a projection unit, configured to project the above-mentioned target point cloud image into the above-mentioned voxel grid to generate a target bird's-eye view; a fragmentation unit, configured to fragment the above-mentioned target bird's-eye view to obtain a fragmentation image group; and an image recognition unit, configured to input the above-mentioned fragmentation image group into a pre-trained point cloud image recognition model according to a preset disturbance probability to obtain an image recognition result.
[0014] Optionally, the image recognition unit is further configured to: perform perturbation processing on each fragment image in the fragment image group according to the preset perturbation probability to generate a fragment perturbation image, and obtain a fragment perturbation image group; perform feature extraction processing on each fragment perturbation image in the fragment perturbation image group to generate a fragment feature image, and obtain a fragment feature image group; perform pooling processing on each fragment feature image in the fragment feature image group to generate a fragment pooling feature image, and obtain a fragment pooling feature image group; perform feature aggregation processing on the fragment pooling feature images included in the fragment pooling feature image group to obtain an aggregated feature image.
[0015] Optionally, the image recognition unit is further configured to: decode the above-mentioned aggregated feature map to generate a decoding map as an image recognition result.
[0016] Optionally, the image recognition unit is further configured to: perform pooling processing on the above-mentioned fragmentation feature map to generate a fragmentation pooling sub-feature map group; and perform splicing processing on the fragmentation pooling sub-feature maps included in the above-mentioned fragmentation pooling sub-feature map group to generate a fragmentation pooling feature map.
[0017] Optionally, the device further includes: a point cloud image recognition model training unit; the point cloud image recognition model training unit includes: a projection subunit, an input subunit, a first determination subunit, and an adjustment subunit. The projection subunit is configured to project the point cloud image into the voxel grid to generate a bird's-eye view as a sample image; the input subunit is configured to input the sample image into the network model to be trained to obtain a sample reconstruction image; the first determination subunit is configured to determine the pixel value of the pixel point included in the sample image and the error value of the pixel value of the pixel point included in the sample reconstruction image based on a preset loss function; the adjustment subunit is configured to adjust the network parameters in the network model to be trained in response to the error value being greater than or equal to a preset threshold.
[0018] Optionally, the point cloud image recognition model training unit further includes: a second determination subunit, configured to determine the network model to be trained as a point cloud image recognition model in response to the error value being less than the preset threshold.
[0019] Optionally, the first determination subunit is further configured to: in response to the error value being greater than or equal to the preset threshold, record the number of training times of the network model to be trained; in response to the number of training times satisfying a preset adjustment condition, adjust the disturbance probability of the random perturbation module in the network model to be trained.
[0020] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0021] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
[0022] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the image recognition method of some embodiments of the present disclosure, the problem of image overlap when projecting the point cloud onto the RGB image is solved, and the accuracy of identifying objects is improved. Specifically, the reason for the low accuracy of identifying objects is that the image projected onto the RGB image by the point cloud is a conical image, which easily causes the overlap of the projected images. Based on this, the image recognition method of some embodiments of the present disclosure first reads the point cloud image from the laser radar as the target point cloud image. Thus, a data basis is provided for the subsequent identification of objects in the point cloud image. Secondly, a voxel grid is constructed according to the radar coordinate system of the above-mentioned laser radar. Thus, the voxel grid is constructed by relying on the radar coordinate system of the laser radar, which is convenient for retaining the actual size of the object represented by the point cloud image subsequently projected into the voxel grid. Thus, it is convenient to improve the accuracy of identifying objects in the image. Then, the above-mentioned target point cloud image is projected into the above-mentioned voxel grid to generate a target bird's-eye view. Thus, the size of the object represented in the target point cloud image in the bird's-eye view is retained, and the problem of image overlap is solved. Then, the target bird's-eye view image is fragmented to obtain a fragment image group. This facilitates the recognition of image texture. Finally, according to the preset disturbance probability, the fragment image group is input into the pre-trained point cloud image recognition model to obtain the image recognition result. In this way, the objects in the bird's-eye view can be accurately identified. Thus, the problem of image overlap when projecting the point cloud onto the RGB image is solved, and the accuracy of object recognition is improved. Furthermore, it is convenient for the autonomous driving vehicle to control the vehicle according to the image recognition result during driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0024] Figure 1-Figure 2is a schematic diagram of an application scenario of the image recognition method of some embodiments of the present disclosure;
[0025] Figure 3 is a flow chart of some embodiments of the image recognition method according to the present disclosure;
[0026] Figure 4 is a schematic diagram of an application scenario in which a bird's-eye view of a target is input into a pre-trained point cloud image recognition model in the image recognition method of the present disclosure;
[0027] Figure 5 is a flowchart of some embodiments of training a point cloud image recognition model in an image recognition method according to the present disclosure;
[0028] Figure 6 is a schematic diagram of the structure of some embodiments of the image recognition device according to the present disclosure;
[0029] Figure 7 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0030] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0031] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0032] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0033] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0035] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0036] Figure 1-Figure 2 It is a schematic diagram of an application scenario of the image recognition method according to some embodiments of the present disclosure.
[0037] exist Figure 1 In the application scenario, first, the computing device 101 can read the point cloud image from the laser radar as the target point cloud image 102 (such as Figure 2 102 in FIG. 10). Secondly, the computing device 101 may construct a voxel grid 103 according to the radar coordinate system of the laser radar. Then, the computing device 101 may project the target point cloud image 102 into the voxel grid 103 to generate a target bird's-eye view image 104 (as shown in FIG. 104). Figure 2 As shown in 104, here, Figure 2 104 is a bird's-eye view). Then, the computing device 101 may perform fragmentation processing on the target bird's-eye view image 104 to obtain a fragmentation image group 105. Finally, the computing device 101 may input the fragmentation image group 105 into a pre-trained point cloud image recognition model 106 according to a preset disturbance probability to obtain an image recognition result 107.
[0038] It should be noted that the computing device 101 can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, or as a single software or software module. No specific limitation is made here.
[0039] It should be understood that Figure 1 The number of computing devices in the embodiment is only illustrative. Any number of computing devices may be provided according to implementation requirements.
[0040] Continue to refer Figure 3 , shows a process 300 of some embodiments of the image recognition method according to the present disclosure. The image recognition method comprises the following steps:
[0041] Step 301, read a point cloud image from a laser radar as a target point cloud image.
[0042] In some embodiments, the execution subject of the image recognition method (for example Figure 1 The computing device 101 shown in the figure can read the point cloud image collected by the above laser radar from the laser radar as the target point cloud image. Here, the laser radar can refer to the laser radar installed on the autonomous driving vehicle. For example, the laser radar can be a 16-line laser radar.
[0043] Step 302: construct a voxel grid according to the radar coordinate system of the above-mentioned laser radar.
[0044] In some embodiments, the execution subject may use the radar coordinate system of the laser radar as a reference, and use a preset length as a voxel unit to grid the radar coordinate system to generate a voxel grid. For example, the radar coordinate system may be: x∈[-30, 30], y∈[-15, 15] (in meters). A voxel unit (VoxelUnit) is established with a preset length of 0.05 meters, and the radar coordinate system is gridded. Thus, a voxel grid is generated.
[0045] Step 303: project the target point cloud image onto the voxel grid to generate a bird's-eye view of the target.
[0046] In some embodiments, for each point cloud in the target point cloud image, the execution entity may project the point cloud to a position in the voxel grid that is the same as the point cloud coordinates according to the point cloud coordinates of the point cloud, thereby generating a bird's-eye view of the target.
[0047] Step 304: fragment the target bird's-eye view image to obtain a fragment image group.
[0048] In some embodiments, the above-mentioned execution entity may perform fragmentation processing on the above-mentioned target bird's-eye view to obtain a fragmentation image group. Here, the fragmentation processing may refer to image segmentation processing. Here, the fragmentation processing may also refer to inputting the target bird's-eye view into the above-mentioned fragmentation generation module for fragmentation processing. In practice, the above-mentioned execution entity may input the target bird's-eye view into the above-mentioned fragmentation generation module to obtain a fragmentation image group. Here, the fragmentation generation module may refer to a fragmentation generator (Shred Generator). Here, the size of each fragment is randomly determined, and the range of the long side of the fragment may be [w / 4, w / 2], and the range of the short side of the fragment may be [h / 4, h / 2]. Among them, w may be the short side of the target bird's-eye view, and h may be the long side of the target bird's-eye view.
[0049] Step 305: according to a preset disturbance probability, the above-mentioned fragment image group is input into a pre-trained point cloud image recognition model to obtain an image recognition result.
[0050] In some embodiments, first, the above-mentioned execution entity may perturb each fragment image in the fragment image group according to a preset perturbation probability. Then, the above-mentioned execution entity may input the perturbed fragment image group into a pre-trained point cloud image recognition model to obtain an image recognition result. Here, the perturbation method may include but is not limited to: vertical flip, rotation, dropout (random position and size), noise, horizontal flip, and other perturbations (Do Nothing). Here, the pre-trained point cloud image recognition model may refer to a self-supervised graph neural network.
[0051] In some optional implementations of some embodiments, the above point cloud image recognition model may include: a random perturbation module 402, a weight encoder 403, and a decoder 404. The weight encoder 403 may include a convolutional encoder 4031 and a pooling network 4032. Figure 4 As shown, the execution subject inputs the target bird's-eye view into a pre-trained point cloud image recognition model, which may include the following steps:
[0052] In the first step, according to the preset disturbance probability, each fragment map in the above-mentioned fragment map group is disturbed to generate a fragment disturbance map, and a fragment disturbance map group is obtained. In practice, the above-mentioned execution subject can input each fragment map in the above-mentioned fragment map group 401 into the random disturbance module 402 to generate a fragment disturbance map, and obtain a fragment disturbance map group. Here, the random disturbance module 402 can be a random disturbance module (Radom Disturbance Module). Here, there is no restriction on the setting of the disturbance probability in the random disturbance module 402. Here, the disturbance methods supported by the random disturbance module 402 may include but are not limited to: vertical flip (Vertical Flip), rotation (Rotation), point cloud missing (Dropout) (random position and size), noise (Noise), horizontal flip (Horizontal Flip) and other disturbances (Do Nothing). Here, the disturbance probability may refer to the probability of disturbing each fragment map.
[0053] In the second step, each fragment perturbation graph in the above-mentioned fragment perturbation graph group is subjected to feature extraction processing to generate a fragment feature graph, thereby obtaining a fragment feature graph group. In practice, the above-mentioned execution subject may perform feature extraction processing on each fragment perturbation graph in the above-mentioned fragment perturbation graph group through a convolution encoder 4031 to generate a fragment feature graph, thereby obtaining a fragment feature graph group. Here, the convolution encoder 4031 may refer to a convolution neural network encoder. For example, the convolution encoder 4051 may be a 2D convolution neural network encoder (2D CNN Encoder).
[0054] In the third step, each fragment feature map in the above fragment feature map group is pooled to generate a fragment pooled feature map, thereby obtaining a fragment pooled feature map group.
[0055] In practice, each fragment feature map in the above fragment feature map group is pooled to generate a fragment pooled feature map, including the following sub-steps:
[0056] The first sub-step is to perform pooling processing on the above-mentioned fragment feature map to generate a fragment pooling sub-feature map group. In practice, the above-mentioned execution subject can input the above-mentioned fragment feature map into the pooling network 4032 to obtain a fragment pooling sub-feature map group. Here, the pooling network 4032 can refer to SPP (Spatial Pyramid Pooling). Here, the pooling network 4032 may include at least six pooling cores of different sizes. Here, the size of the pooling core can be [1X1, 2X2, 4X4, 8X8, 16x16, 32x32]. In practice, the fragment feature map is input into each pooling core of the pooling network 4032 to generate a fragment pooling sub-feature map and obtain a fragment pooling sub-feature map group.
[0057] In the second sub-step, the fragment pooling sub-feature maps included in the fragment pooling sub-feature map group are spliced to generate a fragment pooling feature map.
[0058] In the fourth step, feature aggregation processing is performed on the fragment pooling feature maps included in the fragment pooling feature map group to obtain an aggregated feature map. Here, feature aggregation processing may refer to splicing processing.
[0059] The fifth step is to decode the above-mentioned aggregated feature map to generate a decoded map as an image recognition result. In practice, the above-mentioned execution entity can input the aggregated feature map into the decoder 404 to generate a decoded map 405 as an image recognition result. Here, the decoder 404 can refer to a convolutional neural network decoder. For example, the decoder 404 can be a 2D convolutional neural network decoder (2D CNN Decoder).
[0060] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the image recognition method of some embodiments of the present disclosure, the problem of image overlap when projecting a point cloud onto an RGB image is solved, and the accuracy of object recognition is improved. Specifically, the reason for the low accuracy of object recognition is that the image projected onto the RGB image by the point cloud is a conical image, which easily causes the overlap of the projected images.
[0061] Based on this, the image recognition method of some embodiments of the present disclosure first reads a point cloud image from a laser radar as a target point cloud image. Thus, a data basis is provided for the subsequent identification of objects in the point cloud image. Secondly, a voxel grid is constructed according to the radar coordinate system of the above-mentioned laser radar. Thus, the voxel grid is constructed by relying on the radar coordinate system of the laser radar, so as to retain the actual size of the object represented by the point cloud image subsequently projected into the voxel grid. Thus, it is convenient to improve the accuracy of identifying objects in the image. Then, the above-mentioned target point cloud image is projected into the above-mentioned voxel grid to generate a target bird's-eye view. Thus, the size of the object represented in the target point cloud image in the bird's-eye view is retained, solving the problem of image overlap. Then, the above-mentioned target bird's-eye view is fragmented to obtain a fragment image group. Thus, it is convenient to improve the recognition of image texture. Finally, according to the preset disturbance probability, the above-mentioned fragment image group is input into a pre-trained point cloud image recognition model to obtain an image recognition result. Thus, objects in the bird's-eye view can be accurately identified. Thus, the problem of image overlap when projecting the point cloud onto the RGB image is solved, and the accuracy of object recognition is improved. Furthermore, it is convenient for the autonomous driving vehicle to control the vehicle according to the image recognition results during driving.
[0062] Further references Figure 5 , shows a flowchart of some embodiments of training a point cloud image recognition model in an image recognition method according to the present disclosure. The point cloud image recognition model training method comprises the following steps:
[0063] Step 501 : Project the point cloud image into a voxel grid to generate a bird's-eye view as a sample image.
[0064] In some embodiments, the execution subject of the image recognition method (for example Figure 1 The computing device 101 shown can project the point cloud image into a voxel grid to generate a bird's-eye view as a sample image. Here, the point cloud image can be a point cloud image obtained from a terminal device.
[0065] Step 502: input the sample graph into the network model to be trained to obtain a sample reconstruction graph.
[0066] In some embodiments, the execution subject may input the sample graph into a network model to be trained to obtain a sample reconstruction graph. Here, the network model to be trained may refer to an untrained self-supervised graph neural network (GRAPH-BERT).
[0067] Step 503: Based on a preset loss function, determine the error value between the pixel value of the pixel point included in the sample image and the pixel value of the pixel point included in the corresponding sample reconstruction image.
[0068] In some embodiments, the execution subject may determine the error value between the pixel value of the pixel point included in the sample image and the pixel value of the pixel point included in the corresponding sample reconstruction image by using the following loss function formula:
[0069]
[0070] Wherein, MSE represents the error value between the pixel value of the pixel point included in the above sample image and the pixel value of the corresponding pixel point included in the above sample reconstruction image. n represents the number of pixels included in the above sample reconstruction image. i represents the sequence number of the pixel point included in the above sample reconstruction image. i represents the pixel value of the i-th pixel in the above sample reconstruction image. i Represents the pixel value of the pixel point included in the sample image corresponding to the i-th pixel point in the above sample reconstruction image.
[0071] Step 504: in response to the error value being greater than or equal to a preset threshold, adjusting the network parameters in the network model to be trained.
[0072] In some embodiments, the execution subject may adjust the network parameters in the network model to be trained in response to the error value being greater than or equal to a preset threshold. Here, there is no restriction on the setting of the preset threshold. For example, the difference between the error value and the preset threshold may be calculated to obtain the loss difference. On this basis, the error value is passed forward from the last layer of the model using back propagation, stochastic gradient descent and other methods to adjust the parameters of each layer. Of course, as needed, the network freezing (dropout) method may also be used to keep the network parameters of some layers unchanged and not adjust them. There is no limitation on this.
[0073] In some optional implementations of some embodiments, in response to the error value being greater than or equal to a preset threshold, the execution subject may adjust the network parameters in the network model to be trained through the following steps:
[0074] The first step is to record the number of training times of the network model to be trained in response to the error value being greater than or equal to the preset threshold.
[0075] In the second step, in response to the above-mentioned number of training times satisfying the preset adjustment condition, the disturbance probability of the random disturbance module in the above-mentioned network model to be trained is adjusted. Here, the preset adjustment condition may be "the number of training times is greater than or equal to the preset number of times". Here, adjusting the disturbance probability of the random disturbance module in the above-mentioned network model to be trained may be to increase the disturbance probability. There is no restriction on the increase in the disturbance probability. For example, the increase in the disturbance probability may be 0.01.
[0076] Step 505, in response to the error value being less than the preset threshold, determining the network model to be trained as a point cloud image recognition model.
[0077] In some embodiments, the execution entity may determine the network model to be trained as a point cloud image recognition model in response to the error value being less than the preset threshold.
[0078] from Figure 5 It can be seen that Figure 3 Compared with the description of some corresponding embodiments, Figure 5 In some corresponding embodiments, process 500 trains and adjusts the point cloud image recognition model so that the point cloud image recognition model can accurately recognize the texture of objects in the bird's-eye view, thereby improving the accuracy of the point cloud image recognition model in recognizing the bird's-eye view.
[0079] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of an image recognition device. These device embodiments are similar to Figure 3 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0080] like Figure 6 As shown, the image recognition device 600 of some embodiments includes: a reading unit 601, a construction unit 602, a projection unit 603, a fragmentation unit 604 and an image recognition unit 605. The reading unit 601 is configured to read a point cloud image from a laser radar as a target point cloud image; the construction unit 602 is configured to construct a voxel grid according to the radar coordinate system of the laser radar; the projection unit 603 is configured to project the target point cloud image into the voxel grid to generate a target bird's-eye view; the fragmentation unit 604 is configured to fragment the target bird's-eye view to obtain a fragmentation image group; the image recognition unit 605 is configured to input the fragmentation image group into a pre-trained point cloud image recognition model according to a preset disturbance probability to obtain an image recognition result.
[0081] Optionally, the image recognition unit 605 is further configured to: perform perturbation processing on each fragment image in the fragment image group according to the preset perturbation probability to generate a fragment perturbation image, and obtain a fragment perturbation image group; perform feature extraction processing on each fragment perturbation image in the fragment perturbation image group to generate a fragment feature image, and obtain a fragment feature image group; perform pooling processing on each fragment feature image in the fragment feature image group to generate a fragment pooling feature image, and obtain a fragment pooling feature image group; perform feature aggregation processing on the fragment pooling feature images included in the fragment pooling feature image group to obtain an aggregated feature image.
[0082] Optionally, the image recognition unit 605 is further configured to: decode the above-mentioned aggregated feature map to generate a decoding map as an image recognition result.
[0083] Optionally, the image recognition unit 605 is further configured to: perform pooling processing on the above-mentioned fragmentation feature map to generate a fragmentation pooling sub-feature map group; and perform splicing processing on the fragmentation pooling sub-feature maps included in the above-mentioned fragmentation pooling sub-feature map group to generate a fragmentation pooling feature map.
[0084] Optionally, the device 600 further includes: a point cloud image recognition model training unit; the point cloud image recognition model training unit includes: a projection subunit, an input subunit, a first determination subunit, and an adjustment subunit. The projection subunit is configured to project the point cloud image into the voxel grid to generate a bird's-eye view as a sample image; the input subunit is configured to input the sample image into the network model to be trained to obtain a sample reconstruction image; the first determination subunit is configured to determine the pixel value of the pixel point included in the sample image and the error value of the pixel value of the pixel point included in the sample reconstruction image based on a preset loss function; the adjustment subunit is configured to adjust the network parameters in the network model to be trained in response to the error value being greater than or equal to a preset threshold.
[0085] Optionally, the point cloud image recognition model training unit further includes: a second determination subunit, configured to determine the network model to be trained as a point cloud image recognition model in response to the error value being less than the preset threshold.
[0086] Optionally, the first determination subunit is further configured to: in response to the error value being greater than or equal to the preset threshold, record the number of training times of the network model to be trained; in response to the number of training times satisfying a preset adjustment condition, adjust the disturbance probability of the random perturbation module in the network model to be trained.
[0087] It is understood that the units described in the device 600 are similar to those described in the reference Figure 3Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 600 and the units included therein, and will not be described in detail here.
[0088] Reference below Figure 7 , which shows an electronic device (eg, Figure 1 The electronic devices in some embodiments of the present disclosure may include but are not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0089] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0090] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 7 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0091] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0092] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer 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. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0093] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0094] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: reads a point cloud image from the laser radar as a target point cloud image; constructs a voxel grid according to the radar coordinate system of the laser radar; projects the target point cloud image into the voxel grid to generate a target bird's-eye view; fragments the target bird's-eye view to obtain a fragmented image group; and inputs the fragmented image group into a pre-trained point cloud image recognition model according to a preset disturbance probability to obtain an image recognition result.
[0095] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0096] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0097] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including a reading unit, a construction unit, a projection unit, a fragmentation unit, and an image recognition unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the projection unit may also be described as "a unit that maps the above-mentioned target point cloud image to the above-mentioned voxel grid to generate a target bird's-eye view".
[0098] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0099] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. An image recognition method, comprising: Read the point cloud image from the laser radar as the target point cloud image; Constructing a voxel grid according to a radar coordinate system of the laser radar; Projecting the target point cloud image into the voxel grid to generate a bird's-eye view of the target; Fragmenting the target bird's-eye view image to obtain a fragment image group; According to a preset disturbance probability, the fragment image group is input into a pre-trained point cloud image recognition model to obtain an image recognition result; The point cloud image recognition model is trained by the following steps: Projecting the point cloud image into the voxel grid to generate a bird's-eye view as a sample image; Inputting the sample graph into the network model to be trained to obtain a sample reconstruction graph; Based on a preset loss function, determining an error value between a pixel value of a pixel point included in the sample image and a pixel value of a pixel point included in the corresponding sample reconstruction image; In response to the error value being greater than or equal to a preset threshold, recording the number of training times of the network model to be trained; In response to the number of training times satisfying a preset adjustment condition, the disturbance probability of the random disturbance module in the network model to be trained is adjusted.
2. The method according to claim 1, wherein: The step of inputting the fragment image group into a pre-trained point cloud image recognition model according to a preset disturbance probability to obtain an image recognition result includes: According to the preset disturbance probability, performing a disturbance process on each fragment graph in the fragment graph group to generate a fragment disturbance graph, thereby obtaining a fragment disturbance graph group; Performing feature extraction processing on each fragment disturbance map in the fragment disturbance map group to generate a fragment feature map, thereby obtaining a fragment feature map group; Performing pooling processing on each fragment feature map in the fragment feature map group to generate a fragment pooling feature map, thereby obtaining a fragment pooling feature map group; Perform feature aggregation processing on the fragment pooling feature maps included in the fragment pooling feature map group to obtain an aggregated feature map.
3. The method according to claim 2, wherein: The step of inputting the fragment image group into a pre-trained point cloud image recognition model to obtain an image recognition result further includes: The aggregated feature map is decoded to generate a decoded map as an image recognition result.
4. The method according to claim 2, wherein: The performing pooling processing on each fragment feature map in the fragment feature map group to generate a fragment pooling feature map comprises: Performing pooling processing on the fragment feature map to generate a fragment pooled sub-feature map group; The fragment pooling sub-feature maps included in the fragment pooling sub-feature map group are spliced to generate a fragment pooling feature map.
5. The method according to claim 1, wherein: The steps also include: In response to the error value being less than the preset threshold, the network model to be trained is determined as a point cloud image recognition model.
6. An image recognition device, applied to the method according to claim 1, comprising: A reading unit is configured to read a point cloud image from the laser radar as a target point cloud image; A construction unit configured to construct a voxel grid according to a radar coordinate system of the laser radar; a projection unit configured to project the target point cloud image into the voxel grid to generate a bird's-eye view of the target; A fragmentation unit is configured to perform fragmentation processing on the target bird's-eye view image to obtain a fragmentation image group; The image recognition unit is configured to input the fragment image group into a pre-trained point cloud image recognition model according to a preset disturbance probability to obtain an image recognition result.
7. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Laser radar 3D real-time target detection method fusing multi-frame time sequence point cloud
CN111429514A
Model training method and device, image recognition method and device, electronic equipment and storage medium
CN111639607A
Self-supervision model pre-training method and system and medium
CN112651916A