Three-dimensional object detection method, device and computer-readable storage medium
Through the semantic extraction and detection module of the target detection model, combined with feature alignment, three-dimensional target frame information is generated, which solves the problem of low accuracy of three-dimensional target detection caused by the lack of depth information in monocular camera images, and improves the accuracy of detection.
Patent Information
- Application Number
- CN202111502649.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-09
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-12-09
AI Technical Summary
Images captured by monocular cameras lack depth information, resulting in low accuracy in three-dimensional target detection.
The semantic extraction module of the target detection model is used to extract image semantic features, and the detection module predicts two-dimensional and intermediate three-dimensional frame information, combined with the feature alignment module to generate three-dimensional target frame information, simulating object category recognition in human vision to provide prior information.
The accuracy of three-dimensional target detection is improved, and the accuracy of depth information correspondence is improved through image semantic features.
Smart Images

Figure CN114359892B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a three-dimensional target detection method, device and computer-readable storage medium. Background Art
[0002] Images taken by a monocular camera lack depth information. In order to detect 3D objects in monocular camera images, related technologies train the depth estimation branch through the supervision of 3D object detection boxes and further detect 3D objects. This method has poor effect in learning depth information, resulting in low accuracy in detecting 3D objects. Summary of the invention
[0003] The main purpose of the present invention is to provide a three-dimensional target detection method, device and computer-readable storage medium, aiming to solve the technical problem of low accuracy in detecting three-dimensional targets.
[0004] To achieve the above object, the present invention provides a three-dimensional target detection method, the method comprising:
[0005] The semantic extraction module of the target detection model is used to extract the image semantic features of the image to be detected;
[0006] According to the detection module of the target detection model, the image semantic features and the image to be detected are predicted to obtain two-dimensional frame information and intermediate three-dimensional frame information of the image to be detected;
[0007] The two-dimensional frame information and the intermediate three-dimensional frame information are detected by the detection module to obtain three-dimensional target frame information, wherein the target detection model includes the semantic extraction module and the detection module connected in sequence.
[0008] Optionally, the step of extracting image semantic features of the image to be detected by using the semantic extraction module of the target detection model includes:
[0009] Using the encoder of the semantic extraction module to extract multi-scale features of the image to be detected;
[0010] The decoder of the semantic extraction module is used to extract the multi-scale features to obtain the image semantic features, and the semantic extraction module includes the encoder and the decoder connected in sequence.
[0011] Optionally, the encoder and the decoder are connected in a skip connection manner, the network structure of the semantic extraction module is a cascaded pyramid network structure, and the encoder includes a pyramid scene parsing network PSPNet.
[0012] Optionally, the step of predicting the image semantic features and the image to be detected according to the detection module of the target detection model to obtain the two-dimensional frame information and the intermediate three-dimensional frame information corresponding to the image to be detected includes:
[0013] Performing splicing processing on the image semantic features and the image to be detected to obtain spliced data;
[0014] Performing prediction processing on the spliced data through the backbone network of the detection module to obtain the two-dimensional frame information and the intermediate three-dimensional frame information;
[0015] The intermediate three-dimensional frame information includes the intermediate three-dimensional frame position, the intermediate three-dimensional frame size and the first rotation angle of each object in the image to be detected.
[0016] Optionally, the step of detecting the two-dimensional frame information and the intermediate three-dimensional frame information by the detection module to obtain the three-dimensional target frame information includes:
[0017] Using the feature alignment submodule of the detection module, perform feature alignment processing on the two-dimensional frame information and the intermediate three-dimensional frame to obtain the three-dimensional target frame information;
[0018] The three-dimensional target frame information includes the three-dimensional target frame position, the three-dimensional target frame size and the second rotation angle of each object in the image to be detected, and the feature alignment submodule is constructed based on the projection matrix.
[0019] Optionally, the method further comprises:
[0020] The model to be trained is trained by the image data to be trained, wherein the model to be trained includes a semantic extraction module to be trained and a detection module to be trained connected in sequence, the network of the semantic extraction module to be trained is a cascade pyramid network, the detection module to be trained includes a preset backbone network, and the image data to be trained includes an image taken by a monocular camera;
[0021] After detecting that the training of the model to be trained is completed, the model to be trained is saved as the target detection model.
[0022] Optionally, after detecting that the training of the model to be trained is completed, before the step of saving the model to be trained as the target detection model, the method further includes:
[0023] When the first loss function of the semantic extraction module to be trained converges and the second loss function of the detection module to be trained converges, it is determined that the training of the model to be trained is completed.
[0024] In addition, to achieve the above-mentioned purpose, the present invention further provides a three-dimensional object detection device, the three-dimensional object detection device comprising:
[0025] An extraction module, used for extracting image semantic features of the image to be detected by using a semantic extraction module of the target detection model;
[0026] A prediction module, used to predict the image semantic features and the image to be detected according to the detection module of the target detection model, and obtain the two-dimensional frame information and the intermediate three-dimensional frame information corresponding to the image to be detected;
[0027] A three-dimensional frame detection module is used to detect the two-dimensional frame information and the intermediate three-dimensional frame information through the detection module to obtain three-dimensional target frame information, wherein the target detection model includes the semantic extraction module and the detection module connected in sequence.
[0028] In addition, to achieve the above-mentioned purpose, the present invention also provides a three-dimensional target detection device, which includes: a memory, a processor, and a three-dimensional target detection program stored in the memory and executable on the processor, and the three-dimensional target detection program, when executed by the processor, implements the steps of any one of the three-dimensional target detection methods described above.
[0029] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a three-dimensional target detection program is stored. When the three-dimensional target detection program is executed by a processor, the steps of any of the three-dimensional target detection methods described above are implemented.
[0030] The embodiment of the present invention proposes a three-dimensional target detection method, device and computer-readable storage medium, which extracts the image semantic features of the image to be detected by using the semantics of the target detection model, predicts the image semantic features and the image to be detected according to the detection module of the target detection model, obtains the two-dimensional frame information and the intermediate three-dimensional frame information of the image to be detected, and detects the two-dimensional frame information and the intermediate three-dimensional frame information through the detection module to obtain the three-dimensional target frame information, wherein the target detection model includes a semantic extraction module and a detection module connected in sequence. In this way, the category of the object in the image to be detected is represented by the image semantic features, simulating the recognition of the object category by people, so as to provide prior information for the construction of the three-dimensional space. Furthermore, after the two-dimensional frame information and the three-dimensional frame information are obtained by prediction based on the image semantic features and the image to be detected, the three-dimensional frame information is detected, so that the prior information of the image semantic features can effectively improve the accuracy of the subsequent construction of the corresponding relationship of the depth information, so as to further improve the accuracy of the three-dimensional target detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;
[0032] Figure 2 A schematic diagram of a flow chart of a first embodiment of a three-dimensional object detection method according to the present invention;
[0033] Figure 3 A schematic diagram of a flow chart of a second embodiment of a three-dimensional object detection method according to the present invention;
[0034] Figure 4 A schematic diagram of a flow chart of a third embodiment of a three-dimensional object detection method according to the present invention;
[0035] Figure 5 A schematic diagram of a flow chart of a fourth embodiment of a three-dimensional object detection method according to the present invention;
[0036] Figure 6 A schematic diagram of the structure of an embodiment of a three-dimensional object detection device of the present invention;
[0037] Figure 7 It is a schematic diagram of an embodiment of the model structure of the target detection model involved in an embodiment of the present invention.
[0038] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0039] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0040] like Figure 1 As shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.
[0041] like Figure 1 As shown, the device may include: a processor 1001, such as a CPU, a memory 1002, and a communication bus 1003. The communication bus 1003 is used to realize the connection and communication between these components. The memory 1002 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1002 may optionally be a storage device independent of the aforementioned processor 1001.
[0042] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0043] like Figure 1As shown, the memory 1002 as a computer storage medium may include a three-dimensional object detection program.
[0044] exist Figure 1 In the device shown, the processor 1001 can be used to call the three-dimensional object detection program stored in the memory 1002 and perform the following operations:
[0045] The semantic extraction module of the target detection model is used to extract the image semantic features of the image to be detected;
[0046] According to the detection module of the target detection model, the image semantic features and the image to be detected are predicted to obtain two-dimensional frame information and intermediate three-dimensional frame information of the image to be detected;
[0047] The two-dimensional frame information and the intermediate three-dimensional frame information are detected by the detection module to obtain three-dimensional target frame information, wherein the target detection model includes the semantic extraction module and the detection module connected in sequence.
[0048] Further, the processor 1001 may call the three-dimensional object detection program stored in the memory 1002, and further perform the following operations:
[0049] Using the encoder of the semantic extraction module to extract multi-scale features of the image to be detected;
[0050] The decoder of the semantic extraction module is used to extract the multi-scale features to obtain the image semantic features, and the semantic extraction module includes the encoder and the decoder connected in sequence.
[0051] Further, the processor 1001 may call the three-dimensional object detection program stored in the memory 1002, and further perform the following operations:
[0052] Performing splicing processing on the image semantic features and the image to be detected to obtain spliced data;
[0053] Performing prediction processing on the spliced data through the backbone network of the detection module to obtain the two-dimensional frame information and the intermediate three-dimensional frame information;
[0054] The intermediate three-dimensional frame information includes the intermediate three-dimensional frame position, the intermediate three-dimensional frame size and the first rotation angle of each object in the image to be detected.
[0055] Further, the processor 1001 may call the three-dimensional object detection program stored in the memory 1002, and further perform the following operations:
[0056] Using the feature alignment submodule of the detection module, perform feature alignment processing on the two-dimensional frame information and the intermediate three-dimensional frame to obtain the three-dimensional target frame information;
[0057] The three-dimensional target frame information includes the three-dimensional target frame position, the three-dimensional target frame size and the second rotation angle of each object in the image to be detected, and the feature alignment submodule is constructed based on the projection matrix.
[0058] Further, the processor 1001 may call the three-dimensional object detection program stored in the memory 1002, and further perform the following operations:
[0059] The model to be trained is trained by the image data to be trained, wherein the model to be trained includes a semantic extraction module to be trained and a detection module to be trained connected in sequence, the network of the semantic extraction module to be trained is a cascade pyramid network, the detection module to be trained includes a preset backbone network, and the image data to be trained includes an image taken by a monocular camera;
[0060] After detecting that the training of the model to be trained is completed, the model to be trained is saved as the target detection model.
[0061] Further, the processor 1001 may call the three-dimensional object detection program stored in the memory 1002, and further perform the following operations:
[0062] When the first loss function of the semantic extraction module to be trained converges and the second loss function of the detection module to be trained converges, it is determined that the training of the model to be trained is completed.
[0063] Reference Figure 2 A first embodiment of the present invention provides a three-dimensional object detection method, the three-dimensional object detection method comprising:
[0064] Step S10, extracting image semantic features of the image to be detected using a semantic extraction module of the target detection model;
[0065] The object detection model is a pre-trained machine learning model for detecting three-dimensional objects. The semantic extraction module is a model structure included in the object detection model for extracting semantic features. Image semantic features can be used to characterize the category of objects in the image to be detected. Objects refer to the physical elements contained in the image, such as people, cars, trees, etc. The image semantic features of different objects in the image are different, so the categories of different objects can be distinguished based on the image semantic features, and are used to simulate the category priors of scenes or environments in human vision. Through pixel-level classification tasks, prior information on categories such as people, vehicles, and cyclists is provided.
[0066] Optionally, the image to be detected is an image taken by a monocular camera.
[0067] Optionally, the semantic extraction module can also be regarded as a semantic segmentation module.
[0068] In one exemplary technology, when detecting the three-dimensional target frame of an image taken by a monocular camera, depth estimation is mainly performed from the perspective of machine vision. Since the training data consists of images taken by a monocular camera, which does not have pixel-level depth information, the depth estimation branch can only be trained through the supervision of the three-dimensional target detection frame, resulting in inaccurate generation of the two-dimensional detection frame to the three-dimensional detection frame. In another exemplary technology, the main improvement direction focuses on how to better migrate the two-dimensional target detection algorithm to three dimensions, such as using deformable convolution, adding two-dimensional to three-dimensional alignment processes and optimizing constraints. The above method has a poor effect on learning depth information from two-dimensional images, resulting in low performance or accuracy of three-dimensional target detection based on monocular camera images, and only considering feature extraction and detection operations from the perspective of machine vision, resulting in the improvement direction focusing on aligning the two-dimensional detection frame to the three-dimensional frame, and low detection performance or accuracy.
[0069] In order to avoid the problems existing in the above exemplary technologies, this embodiment models three-dimensional target detection based on a monocular camera based on the principle of human eye visual imaging, and solves the problems of difficulty in predicting depth information and inaccurate conversion from two-dimensional to three-dimensional.
[0070] The main implementation principle of this embodiment is as follows: This embodiment is different from the exemplary technology in that the three-dimensional target detection method is modeled from machine vision, and is mainly based on the human eye vision mechanism to model monocular three-dimensional target detection. The principles of human three-dimensional vision mainly include physiological perception and psychological perception. Physiological perception includes binocular parallax, motion parallax, and focus blur, and psychological perception includes five visual cues: affine, occlusion, light shadow, texture, and prior knowledge. People use the image information obtained through vision to construct three-dimensional scene perception with the brain. Based on similar principles, this embodiment introduces prior knowledge of object categories when performing three-dimensional target detection based on images. The scene understanding method simulates people's recognition of object categories and provides prior information for the construction of three-dimensional space. Prior information includes birds usually fly in the sky and vehicles are usually larger than people. Based on this, the semantic extraction module used for scene understanding is used to extract image semantic features from the image to provide pixel-level category information prior based on the image semantic features. The target detection head based on depth estimation uses the semantic features and the image features of the image to be detected to predict the two-dimensional box information and the three-dimensional box information. The depth information is then predicted through the feature alignment module, and the projection relationship is combined to achieve mutual alignment from two-dimensional to three-dimensional, and finally generate a three-dimensional target box detection result.
[0071] Among them, the input data of the semantic extraction module is the image to be detected, and the output data is the image semantic features.
[0072] Step S20, predicting the image semantic features and the image to be detected according to the detection module of the target detection model, and obtaining two-dimensional frame information and intermediate three-dimensional frame information of the image to be detected;
[0073] The detection module is a model structure in the target detection model that is at least used to detect the three-dimensional target frame information. The input data of the detection module is the image semantic features and the image to be detected, and the output data is the three-dimensional target detection frame.
[0074] Optionally, after the detection model predicts the image semantic features and the image to be detected, the type label of each object or subject in the image to be detected can be obtained, and the type label can be marked near the three-dimensional box of the image to be detected.
[0075] Optionally, the intermediate three-dimensional frame information is preliminary three-dimensional frame information obtained by preliminary prediction.
[0076] Step S30, detecting the two-dimensional frame information and the intermediate three-dimensional frame information through the detection module to obtain three-dimensional target frame information, wherein the target detection model includes the semantic extraction module and the detection module connected in sequence.
[0077] Optionally, when the two-dimensional frame information and the intermediate three-dimensional frame information are detected by the detection module, the two-dimensional frame information and the intermediate three-dimensional frame information are input into the feature alignment submodule of the detection module, and the alignment relationship is established using the projection matrix to obtain more accurate three-dimensional target frame information.
[0078] In this embodiment, the semantic features of the image to be detected are extracted by using the semantics of the target detection model, and the image semantic features and the image to be detected are predicted according to the detection module of the target detection model to obtain the two-dimensional frame information and the intermediate three-dimensional frame information of the image to be detected. The two-dimensional frame information and the intermediate three-dimensional frame information are detected by the detection module to obtain the three-dimensional target frame information, wherein the target detection model includes a semantic extraction module and a detection module connected in sequence. In this way, the category of the object in the image to be detected is represented by the image semantic features, and the recognition of the object category by humans is simulated to provide prior information for the construction of the three-dimensional space. Furthermore, after the two-dimensional frame information and the three-dimensional frame information are obtained by prediction based on the image semantic features and the image to be detected, the three-dimensional frame information is further detected, so that the prior information of the image semantic features can effectively improve the accuracy of the subsequent construction of the corresponding relationship of the depth information, so as to further improve the accuracy of the three-dimensional target detection.
[0079] Reference Figure 3 The second embodiment of the present invention provides a three-dimensional target detection method based on the above Figure 2 In the first embodiment shown, step S10 includes:
[0080] Step S11, using the encoder of the semantic extraction module to extract multi-scale features of the image to be detected;
[0081] Step S12, using the decoder of the semantic extraction module to extract the multi-scale features to obtain the image semantic features, the semantic extraction module includes the encoder and the decoder connected in sequence.
[0082] Optionally, the encoder and the decoder are connected in a skip connection, the network structure of the semantic extraction module is a cascade pyramid network structure, and the encoder includes a pyramid scene parsing network (PSPNet). The semantic extraction module is used to achieve scene understanding. The semantic extraction module includes an encoder structure and a decoder structure, and the encoder's highest dimensional features use a pyramid scene parsing network to extract multi-scale features.
[0083] Optionally, the final output result of the semantic extraction module is the concatenation of the outputs of each layer of the decoder.
[0084] Optionally, KITTI semantic segmentation annotation is used for supervision, and the most accurate semantic features output by the highest layer of the decoder are concatenated with the image to be detected as the input of the detection module.
[0085] Among them, the main function of the semantic extraction module is to simulate the category prior of scene information in human vision. Through pixel-level classification tasks, it provides prior information on categories such as people, vehicles, and cyclists, which facilitates more accurate construction of depth information correspondence.
[0086] In this embodiment, the encoder of the semantic extraction module is used to extract the multi-scale features of the image to be detected; the decoder of the semantic extraction module is used to extract the multi-scale features to obtain the image semantic features, and the semantic extraction module includes an encoder and a decoder connected in sequence. Through the pixel-level classification task, prior information on categories such as people, vehicles, and cyclists is provided, which facilitates more accurate construction of the depth information correspondence, thereby further combining with the detection module to obtain more accurate three-dimensional frame information.
[0087] Reference Figure 4 The third embodiment of the present invention provides a target detection method based on the above Figure 2 In the first embodiment shown, step S20 includes:
[0088] Step S21, performing splicing processing on the image semantic features and the image to be detected to obtain spliced data;
[0089] Step S22, predicting and processing the spliced data through the backbone network of the detection module to obtain the two-dimensional frame information and the intermediate three-dimensional frame information; wherein the intermediate three-dimensional frame information includes the intermediate three-dimensional frame position, intermediate three-dimensional frame size and first rotation angle of each object in the image to be detected.
[0090] In one embodiment, the step S30 includes:
[0091] Using the feature alignment submodule of the detection module, perform feature alignment processing on the two-dimensional frame information and the intermediate three-dimensional frame to obtain the three-dimensional target frame information;
[0092] The three-dimensional target frame information includes the three-dimensional target frame position, the three-dimensional target frame size and the second rotation angle of each object in the image to be detected, and the feature alignment submodule is constructed based on the projection matrix.
[0093] The input data of the detection module includes image semantic features and the image to be detected. The image semantic features and the image to be detected can be firstly spliced together to obtain spliced data and inputted into the detection module.
[0094] Reference Figure 7 As shown, Figure 7 Schematic diagram of the model structure of the target detection model involved in the embodiment of the present invention, wherein the target detection module includes a semantic extraction module and a detection module connected in sequence. B1, B2 and B3 are the three-dimensional target frame information of different objects in the image respectively.
[0095] The semantic extraction module is built based on a cascade pyramid network. The semantic extraction module includes an encoder structure and a decoder structure connected in sequence. The encoder structure and the decoder structure use jump connections for feature splicing. The final output of the semantic extraction module is the splicing of the outputs of each layer of the decoder. The detection module is built based on a backbone network, which can be a backbone network based on DLA-102.
[0096] Optionally, after further processing the input features using the backbone network, two-dimensional frame information and preliminary three-dimensional frame information are predicted, and the preliminary three-dimensional frame information is the intermediate three-dimensional frame information. The two-dimensional frame information and the preliminary three-dimensional frame information are input into the feature alignment submodule, and the alignment relationship is established using the projection matrix. The feature fusion alignment is then better performed through the adaptive attention mechanism, and finally the three-dimensional target frame information is output. The two-dimensional frame information includes the position information of each object in the image to be detected.
[0097] Optionally, the intermediate 3D frame position includes the first center point coordinates (x1, y1, z1) of the preliminary 3D frame, the intermediate 3D frame size includes the first width, height and length (w1, h1, l1) of the preliminary 3D frame, and the first rotation angle is the rotation angle of the preliminary 3D frame.
[0098] Optionally, the three-dimensional target frame position includes the second center point coordinates (x2, y2, z2) of the three-dimensional target frame, the three-dimensional target frame size includes the second width, height and length (w2, h2, l2) of the three-dimensional target frame, and the second rotation angle is the rotation angle of the three-dimensional target frame.
[0099] Optionally, after further processing the input features using the backbone network, the detection module can also predict type labels and two-dimensional frame information to preliminarily identify the type and position of the object in the image, and can also predict preliminary three-dimensional frame information. The role of the type label is to mark the object type corresponding to the three-dimensional target frame on the image to be detected, so as to facilitate the identification of the object type of the target in the image to be detected.
[0100] In this embodiment, the image semantic features and the image to be detected are spliced to obtain spliced data; the spliced data is predicted by the backbone network of the detection module to obtain the two-dimensional frame information and the intermediate three-dimensional frame information, and the feature alignment submodule of the detection module is used to perform feature alignment processing on the two-dimensional frame information and the intermediate three-dimensional frame to obtain the three-dimensional target frame information, so that the three-dimensional target can be more accurately identified in combination with the image semantic features, and the accuracy of the three-dimensional target can be further improved through feature alignment.
[0101] Reference Figure 5 The fourth embodiment of the present invention provides a three-dimensional target detection method based on the above Figure 2 In the first embodiment shown, the method further comprises:
[0102] Step S40, training a model to be trained using the image data to be trained, wherein the model to be trained includes a semantic extraction module to be trained and a detection module to be trained connected in sequence, the network of the semantic extraction module to be trained is a cascade pyramid network, the detection module to be trained includes a preset backbone network, and the image data to be trained includes images taken by a monocular camera;
[0103] Step S50, after detecting that the training of the model to be trained is completed, saving the model to be trained as the target detection model.
[0104] In one embodiment, before step S50, the method further includes:
[0105] When the first loss function of the semantic extraction module to be trained converges and the second loss function of the detection module to be trained converges, it is determined that the training of the model to be trained is completed.
[0106] In this embodiment, an end-to-end training method is used to train the model to be trained, that is, the semantic extraction module and the detection module are trained simultaneously. The model structure of the model to be trained includes a semantic extraction module and a detection module connected in sequence.
[0107] Optionally, the first loss function is:
[0108]
[0109] in, represents the loss function of the semantic extraction module, CE is the cross entropy loss function, IoU is the intersection over union loss function, i is each layer of the decoder, and λ is the preset weight.
[0110] Optionally, the second loss function is:
[0111]
[0112] in, represents the loss function of the detection module, is the loss function corresponding to the 3D box prediction, The corresponding loss function for 2D box prediction.
[0113] Optionally, for:
[0114]
[0115] Among them, cls refers to classification and reg refers to bounding box regression.
[0116] Optionally, for:
[0117]
[0118] Among them, rpn is the Region Proposal Network (RPN) in the detection network, and rcnn is the Region Convolutional Neural Networks (RCNN).
[0119] In one embodiment, the above method is used to train the model to be trained. The number of epochs (Epoch) of task training can be set to 70, the batch size (Batch size) is set to 4, that is, 4 samples are read from the training set for training in each step of the cycle, the optimizer uses stochastic gradient descent, the momentum (Momentum) is set to 0.9, the initial value of the learning rate (Learning rate) is 0.004, and the learning rate scheduler used is cosine annealing (Cosine annealing). In the inference stage, the intersection-and-union ratio threshold of NMS is set to 0.4, and the confidence threshold is set to 0.75. After the training is completed, the target detection model is obtained. The test data is tested by the target detection model, and the test data includes the image to be detected taken by the monocular camera, and AP is used as the evaluation index. Compared with the exemplary technology, the detection performance of the target detection model used in this embodiment to detect three-dimensional targets, that is, the accuracy is improved.
[0120] In this embodiment, the model to be trained is trained by the image data to be trained, the model to be trained includes a semantic extraction module to be trained and a detection module to be trained connected in sequence, the network of the semantic extraction module to be trained is a cascade pyramid network, the detection module to be trained includes a preset backbone network, and the image data to be trained includes an image taken by a monocular camera; after the training of the model to be trained is completed, the model to be trained is saved as the target detection model. Thus, the target detection model is trained, and when the target detection model is used to detect the image to be detected, its accuracy is improved.
[0121] Reference Figure 6 As shown, Figure 6 This is a schematic diagram of the architecture of an embodiment of a three-dimensional object detection device according to the present invention, wherein the three-dimensional object detection device comprises:
[0122] An extraction module 10 is used to extract image semantic features of the image to be detected using a semantic extraction module of the target detection model;
[0123] A prediction module 20, configured to predict the image semantic features and the image to be detected according to the detection module of the target detection model, and obtain category information, two-dimensional frame information, and intermediate three-dimensional frame information corresponding to the image to be detected;
[0124] The three-dimensional frame detection module 30 is used to detect the category information, the two-dimensional frame information and the intermediate three-dimensional frame information through the detection module to obtain three-dimensional target frame information, wherein the target detection model includes the semantic extraction module and the detection module connected in sequence.
[0125] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0126] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0127] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a device to execute the methods described in each embodiment of the present invention.
[0128] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A three-dimensional target detection method, characterized in that: The method comprises: The semantic extraction module of the target detection model is used to extract the image semantic features of the image to be detected; According to the detection module of the target detection model, the image semantic features and the image to be detected are predicted to obtain two-dimensional frame information and intermediate three-dimensional frame information of the image to be detected; The two-dimensional frame information and the intermediate three-dimensional frame information are detected by the detection module to obtain three-dimensional target frame information, wherein the target detection model includes the semantic extraction module and the detection module connected in sequence; The step of predicting the image semantic features and the image to be detected according to the detection module of the target detection model to obtain the two-dimensional frame information and the intermediate three-dimensional frame information corresponding to the image to be detected includes: Performing splicing processing on the image semantic features and the image to be detected to obtain spliced data; Performing prediction processing on the spliced data through the backbone network of the detection module to obtain the two-dimensional frame information and the intermediate three-dimensional frame information; The intermediate three-dimensional frame information includes the intermediate three-dimensional frame position, the intermediate three-dimensional frame size and the first rotation angle of each object in the image to be detected; The step of detecting the two-dimensional frame information and the intermediate three-dimensional frame information by the detection module to obtain the three-dimensional target frame information includes: Using the feature alignment submodule of the detection module, perform feature alignment processing on the two-dimensional frame information and the intermediate three-dimensional frame to obtain the three-dimensional target frame information; The three-dimensional target frame information includes the three-dimensional target frame position, the three-dimensional target frame size and the second rotation angle of each object in the image to be detected, and the feature alignment submodule is constructed based on the projection matrix.
2. The method according to claim 1, characterized in that The step of extracting image semantic features of the image to be detected by using the semantic extraction module of the target detection model comprises: Using the encoder of the semantic extraction module to extract multi-scale features of the image to be detected; The decoder of the semantic extraction module is used to extract the multi-scale features to obtain the image semantic features, and the semantic extraction module includes the encoder and the decoder connected in sequence.
3. The method according to claim 2, characterized in that The encoder and the decoder are connected in a skip connection manner, the network structure of the semantic extraction module is a cascade pyramid network structure, and the encoder includes a pyramid scene parsing network PSPNet.
4. The method according to claim 1, characterized in that The method further comprises: The model to be trained is trained by the image data to be trained, wherein the model to be trained includes a semantic extraction module to be trained and a detection module to be trained connected in sequence, the network of the semantic extraction module to be trained is a cascade pyramid network, the detection module to be trained includes a preset backbone network, and the image data to be trained includes an image taken by a monocular camera; After detecting that the training of the model to be trained is completed, the model to be trained is saved as the target detection model.
5. The method according to claim 4, characterized in that The step of, after detecting that the training of the model to be trained is completed, before saving the model to be trained as the target detection model, further includes: When the first loss function of the semantic extraction module to be trained converges and the second loss function of the detection module to be trained converges, it is determined that the training of the model to be trained is completed.
6. A three-dimensional target detection device, characterized in that: The three-dimensional target detection device comprises: An extraction module, used for extracting image semantic features of the image to be detected by using a semantic extraction module of the target detection model; A prediction module, used to predict the image semantic features and the image to be detected according to the detection module of the target detection model, and obtain the two-dimensional frame information and the intermediate three-dimensional frame information corresponding to the image to be detected; A three-dimensional frame detection module, used to detect the two-dimensional frame information and the intermediate three-dimensional frame information through the detection module to obtain three-dimensional target frame information, wherein the target detection model includes the semantic extraction module and the detection module connected in sequence; The three-dimensional frame detection module is also used to perform splicing processing on the image semantic features and the image to be detected to obtain splicing data; the splicing data is predicted and processed by the backbone network of the detection module to obtain the two-dimensional frame information and the intermediate three-dimensional frame information; wherein the intermediate three-dimensional frame information includes the intermediate three-dimensional frame position, the intermediate three-dimensional frame size and the first rotation angle of each object in the image to be detected; the feature alignment submodule of the detection module is used to perform feature alignment processing on the two-dimensional frame information and the intermediate three-dimensional frame to obtain the three-dimensional target frame information; wherein the three-dimensional target frame information includes the three-dimensional target frame position, the three-dimensional target frame size and the second rotation angle of each object in the image to be detected, and the feature alignment submodule is constructed based on the projection matrix.
7. A three-dimensional target detection device, characterized in that: The three-dimensional object detection device includes: a memory, a processor, and a three-dimensional object detection program stored in the memory and executable on the processor. When the three-dimensional object detection program is executed by the processor, the steps of the three-dimensional object detection method as described in any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a three-dimensional object detection program, and when the three-dimensional object detection program is executed by a processor, the steps of the three-dimensional object detection method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Multi-scale three-dimensional target detection method based on feature pyramid network
CN111832655A
Three-dimensional target detection method, system and device based on self-labeling training sample
CN112257605A
