Scenario aware method and related device thereof
Through the use of cross-modal attention-aware architecture and hybrid expert architecture, the problem of strong coupling between image data and point cloud data in the autonomous driving system is solved, and scenarios with high accuracy are achieved even when the data is missing or of low quality. Perception.
Patent Information
- Application Number
- PCT/CN2024/088038
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-19
- Filing Date
- 2024-04-16
- Publication Date
- 2024-10-24
AI Technical Summary
The autonomous driving system has strong coupling when acquiring image data and point cloud data. As a result, when part of the data cannot be acquired under certain special circumstances, the scene perception results are not accurate enough, especially when the data quality is low.
It adopts a cross-modal attention perception architecture and a hybrid expert architecture to achieve accurate perception of the target scene through feature extraction and fusion of image data and point cloud data, and can still obtain high accuracy even when the data is missing or of poor quality. degree of perceived results.
It achieves that when the target model only obtains image data or point cloud data, it can still obtain highly accurate scene perception results, solving the problem of inaccurate scene perception when data is missing or of low quality.
Smart Images

Figure CN2024088038_24102024_PF_FP_ABST
Abstract
Description
A scene perception method and related equipment
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on April 19, 2023, with application number 202310464587.0 and invention name “A scene perception method and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of artificial intelligence (AI) technology, and in particular to a scene perception method and related equipment. Background Art
[0003] In the field of autonomous driving, in order for a vehicle's autonomous driving system to make accurate autonomous driving decisions, it is often necessary for the vehicle's autonomous driving system to have high-precision scene (environment) perception capabilities. Generally, the autonomous driving system obtains scene information through the vehicle's sensors and uses this information to obtain scene perception results.
[0004] In related technologies, vehicle sensors typically include cameras and lidar. When a vehicle's autonomous driving system needs to perceive the surrounding scene, it first collects image data of the scene through the camera and point cloud data of the scene through the lidar. This data is then fed into a neural network model built into the system. The neural network model then extracts features from the image data and the point cloud data, then fuses these features to obtain a scene perception result based on the feature fusion results.
[0005] In the above process, the neural network model needs to fuse the features of the image data and the point cloud data to obtain the scene perception results using the feature fusion results. This shows that there is a strong coupling between the image data and the point cloud data input to the neural network model. In some special cases, if a part of the data cannot be obtained, the final scene perception results obtained by the neural network model will be inaccurate.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a scene perception method and related equipment. Even if the target model only obtains image data of the target scene or only obtains point cloud data of the target scene, the target model can still obtain relatively accurate perception results of the target scene.
[0008] A first aspect of an embodiment of the present application provides a scene perception method, which is implemented by a target model and includes:
[0009] When scene perception is required for a target scene, the camera can first capture image data of the target scene and / or the lidar can capture point cloud data of the target scene. After obtaining the image data and / or point cloud data of the target scene, the image data and / or point cloud data of the target scene can be input into the target model.
[0010] After obtaining the image data of the target scene and / or the point cloud data of the target scene, the target model can perform feature extraction on the image data of the target scene and / or the point cloud data of the target scene, thereby obtaining a first bird's eye view (BEV) feature of the image data and / or a second BEV feature of the point cloud data.
[0011] After obtaining the first BEV feature and / or the second BEV feature, the target model may perform feature fusion on the first BEV feature and / or the second BEV feature based on a preset third BEV feature, thereby obtaining a feature fusion result.
[0012] After obtaining the feature fusion results, the target model can further process the feature fusion structure to obtain the perception results of the target scene. At this point, the scene perception of the target scene is completed.
[0013] The above method demonstrates that when scene perception of a target scene is required, image data and / or point cloud data of the target scene can be acquired and input into the target model. Next, the target model can perform feature extraction on the image data and / or point cloud data to obtain first BEV features from the image data and / or second BEV features from the point cloud data. The target model can then perform feature fusion on the first and / or second BEV features using a pre-set third BEV feature to obtain a feature fusion result. Finally, the target model can further process the feature fusion result to obtain a perception result of the target scene. At this point, scene perception of the target scene is complete. In the aforementioned process, the target model can fuse the third BEV feature with the first BEV feature of the target scene's image data to obtain a feature fusion result, or fuse the third BEV feature with the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, or fuse the third BEV feature, the first BEV feature of the target scene's image data, and the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, so as to use the feature fusion result to obtain the scene's perception result. It can be seen from this that there is no strong coupling between the target scene's image data and the target scene's point cloud data input to the target model. Even if, due to certain special circumstances, the target model only obtains the target scene's image data or only obtains the target scene's point cloud data, the target model's final perception result of the target scene can still be highly accurate.
[0014] In one possible implementation, extracting features from image data and / or point cloud data to obtain first BEV features for the image data and / or second BEV features for the point cloud data includes encoding the image data and / or point cloud data to obtain the first BEV features for the image data and / or the second BEV features for the point cloud data. In the aforementioned implementation, if the data input to the target model includes both image data and point cloud data of the target scene, the target model may encode the image data of the target scene to obtain the first BEV features for the image data, and the target model may encode the point cloud data of the target scene to obtain the second BEV features for the point cloud data. If the data input to the target model includes only the image data of the target scene, the target model may encode the image data of the target scene to obtain only the first BEV features for the image data. If the data input to the target model includes only the point cloud data of the target scene, in the feature extraction module of the target model, the target model may encode the point cloud data of the target scene to obtain only the second BEV features for the point cloud data.
[0015] In one possible implementation, based on a preset third BEV feature, feature fusion is performed on the first BEV feature and / or the second BEV feature to obtain a feature fusion result, including: processing the first BEV feature and / or the second BEV feature based on a deformable attention mechanism based on a preset third BVE feature to obtain a fourth BEV feature; adding the third BEV feature and the fourth BEV feature to obtain a fifth BEV feature; processing the fifth BEV feature based on a hybrid of experts model to obtain a sixth BVE feature; adding the fifth BEV feature and the sixth BEV feature to obtain a seventh BEV feature; and obtaining a feature fusion result based on the seventh BVE feature. In the aforementioned implementation, if the target model obtains features that include both the first and second BEV features, the target model may, based on the third BVE feature, process the first and second BEV features based on a deformable attention mechanism to obtain the fourth BEV feature. If the target model obtains features that include only the first BEV feature, the target model may, based on the third BVE feature, process the first BEV feature based on a deformable attention mechanism to obtain the fourth BEV feature. If the target model only obtains the second BEV feature, the target model may process the second BEV feature using the deformable attention mechanism based on the third BVE feature to obtain the fourth BEV feature. After obtaining the fourth BEV feature, the cross-modal deformable attention layer may send the fourth BEV feature to the first addition layer. After obtaining the fourth BEV feature, the target model may add the third and fourth BEV features to obtain the fifth BEV feature. After obtaining the fifth BEV feature, the target model may process the fifth BEV feature using the mixture of experts model to obtain the sixth BVE feature. After obtaining the sixth BEV feature, the target model may add the fifth and sixth BEV features to obtain the seventh BVE feature. After obtaining the seventh BEV feature, the target model may further process the seventh BEV feature to obtain a feature fusion result, or may directly use the seventh BEV feature as the feature fusion result. It can be seen that the target model of the embodiment of the present application provides a cross-modal attention perception architecture and a hybrid expert architecture. The cross-modal attention perception architecture can ensure that when the input of the model is missing (for example, only image data of the target scene or only point cloud data of the target scene), it can still make accurate scene perception for the target scene. The hybrid expert architecture can ensure that the model can complete multiple perception tasks for the target scene (for example, object detection and object segmentation, etc.).
[0016] In one possible implementation, based on a preset third BVE feature, the first BEV feature and / or the second BEV feature are processed based on a deformable attention mechanism to obtain a fourth BEV feature, including: processing the preset third BVE feature based on a first multi-layer perceptron to obtain first position information of a first sub-feature of the first BEV feature and / or second position information of a second sub-feature of the second BEV feature; based on the first position information and / or the second position information, obtaining the first sub-feature and / or the second sub-feature from the first BEV feature and / or the second BEV feature; processing the third BVE feature based on a second multi-layer perceptron to obtain first weight information of the first sub-feature of the first BEV feature and / or second weight information of the second sub-feature of the second BEV feature; and performing weighted summation on the first sub-feature and / or the second sub-feature based on the first weight information and / or the second weight information to obtain the fourth BEV feature. In the above implementation, the target model can obtain the fourth BEV feature in a variety of ways: (1) If the features obtained by the target model include both the first BEV feature and the second BEV feature, the target model can process the third BVE feature based on the first multi-layer perceptron, thereby obtaining the first position information of the first sub-feature of the first BEV feature and the second position information of the second sub-feature of the second BEV feature. Then, the target model can select the first sub-feature from the first BEV feature and the second sub-feature from the second BEV feature according to the instructions of the first position information and the second position information. At the same time, the target model can also process the third BVE feature based on the second multi-layer perceptron, thereby obtaining the first weight information of the first sub-feature and the second weight information of the second sub-feature. Finally, the target model can use the first weight information and the second weight information to perform a weighted sum of the first sub-feature and the second sub-feature, thereby obtaining the fourth BEV feature. (2) If the features obtained by the target model only include the first BEV feature, the target model can process the third BVE feature based on the first multi-layer perceptron, thereby obtaining the first position information of the first sub-feature of the first BEV feature. Then, the target model can select the first sub-feature from the first BEV feature according to the indication of the first position information. At the same time, the target model can also process the third BVE feature based on the second multi-layer perceptron to obtain the first weight information of the first sub-feature. Finally, the target model can use the first weight information to perform weighted summation on the first sub-feature to obtain the fourth BEV feature. (3) If the feature obtained by the target model is only the second BEV feature, the target model can process the third BVE feature based on the first multi-layer perceptron to obtain the second position information of the second sub-feature of the second BEV feature. Then, the target model can select the second sub-feature from the second BEV feature according to the indication of the second position information.At the same time, the target model can also process the third BVE feature based on the second multi-layer perceptron to obtain the second weight information of the second sub-feature. Finally, the target model can use the second weight information to perform a weighted summation of the second sub-features to obtain the fourth BEV feature. This shows that this implementation method is a specific implementation of the cross-modal attention perception architecture. This implementation method can ensure that even when the model input is missing, it can still smoothly and accurately complete scene perception for the target scene.
[0017] In one possible implementation, processing the fifth BEV feature based on a hybrid expert model to obtain the sixth BEV feature includes: processing the fifth BEV feature based on the first expert model to obtain the eighth BEV feature; processing the fifth BEV feature based on the second expert model to obtain the ninth BEV feature; and processing the eighth and ninth BEV features based on the third expert model to obtain the sixth BEV feature. In this implementation, the target model may process the fifth BEV feature based on the first expert model to obtain the eighth BEV feature. Simultaneously, the target model may also process the fifth BEV feature based on the second expert model to obtain the ninth BEV feature. Finally, the target model may process the eighth and ninth BEV features based on the third expert model to obtain the sixth BEV feature. This demonstrates that this implementation is a specific implementation of a hybrid expert architecture, which ensures that the model can complete multiple perception tasks for target scenarios.
[0018] In one possible implementation, processing the fifth BEV feature based on a hybrid expert model to obtain a sixth BVE feature includes: dividing the fifth BEV feature into multiple third sub-features; dividing the fifth BEV feature into multiple fourth sub-features; processing the multiple third and fourth sub-features based on multiple fourth expert models to obtain multiple fifth sub-features, wherein processing based on one fourth expert model corresponds to at least one third and at least one fourth sub-feature; and summing the multiple fifth sub-features to obtain the sixth BVE feature. In the aforementioned implementation, the target model may divide the fifth BEV feature into multiple third sub-features. Simultaneously, the target model may also divide the fifth BEV feature into multiple fourth sub-features. Next, the target model may process the multiple third and fourth sub-features based on multiple fourth expert models to obtain multiple fifth sub-features. Finally, the target model may sum the multiple fifth sub-features to obtain the sixth BVE feature. This implementation is another specific implementation of the hybrid expert architecture, which ensures that the model can complete multiple perception tasks for target scenarios.
[0019] In one possible implementation, the point cloud data is data collected when the LiDAR is interfered with, and the image data is data collected when the camera is interfered with. In the aforementioned implementation, the image data of the target scene input to the target model can be data collected by the camera when it is interfered with. Similarly, the point cloud data of the target scene input to the target model can also be data collected by the LiDAR when it is interfered with. It can be seen that the image data and point cloud data of the target scene input to the target model can be data of poor quality (data with certain losses), and the target model can still obtain a sufficiently accurate perception result of the target scene based on this data.
[0020] In one possible implementation, based on a preset third BEV feature, feature fusion is performed on the first BEV feature and / or the second BEV feature to obtain a feature fusion result, which also includes: normalizing the third BEV feature to obtain a normalized third BEV feature; normalizing the first BEV feature and / or the second BEV feature to obtain a normalized first BEV feature and / or a normalized second BEV feature; based on a preset third BVE feature, processing the first BEV feature and / or the second BEV feature based on a deformable attention mechanism to obtain a fourth BEV feature includes: based on the normalized third BVE feature, processing the normalized first BEV feature and / or the normalized second BEV feature based on a deformable attention mechanism to obtain a fourth BEV feature.
[0021] In one possible implementation, based on a preset third BEV feature, feature fusion is performed on the first BEV feature and / or the second BEV feature to obtain a feature fusion result, which also includes: normalizing the fifth BEV feature to obtain a normalized fifth BEV feature; and processing the fifth BEV feature based on a hybrid expert model to obtain a sixth BVE feature, which includes: processing the normalized fifth BEV feature based on a hybrid expert model to obtain a sixth BVE feature.
[0022] A second aspect of an embodiment of the present application provides a model training method, which includes: acquiring image data of a target scene and / or point cloud data of the target scene; processing the image data and / or point cloud data through a model to be trained to obtain a perception result of the target scene, wherein the model to be trained is used to: perform feature extraction on the image data and / or point cloud data to obtain a first BEV feature of the image data and / or a second BEV feature of the point cloud data; based on a preset third BEV feature, perform feature fusion on the first BEV feature and / or the second BEV feature to obtain a feature fusion result; based on the feature fusion result, acquire a perception result of the target scene; based on the perception result of the target scene, train the model to be trained to obtain a target model.
[0023] The target model trained by the above method has scene perception capabilities. Specifically, when scene perception of the target scene is required, the image data of the target scene and / or the point cloud data of the target scene can be obtained first, and the image data and / or the point cloud data can be input into the target model. Next, the target model can first perform feature extraction on the image data and / or the point cloud data to obtain the first BEV feature of the image data and / or the second BEV feature of the point cloud data. Then, the target model can use the preset third BEV feature to perform feature fusion on the first BEV feature and / or the second BEV feature to obtain a feature fusion result. Finally, the target model can further process the feature fusion result to obtain the perception result of the target scene. At this point, scene perception for the target scene is completed. In the aforementioned process, the target model can fuse the third BEV feature with the first BEV feature of the target scene's image data to obtain a feature fusion result, or fuse the third BEV feature with the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, or fuse the third BEV feature, the first BEV feature of the target scene's image data, and the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, so as to use the feature fusion result to obtain the scene's perception result. It can be seen from this that there is no strong coupling between the target scene's image data and the target scene's point cloud data input to the target model. Even if, due to certain special circumstances, the target model only obtains the target scene's image data or only obtains the target scene's point cloud data, the target model's final perception result of the target scene can still be highly accurate.
[0024] In one possible implementation, the model to be trained is used to encode image data and / or point cloud data to obtain a first BEV feature of the image data and / or a second BEV feature of the point cloud data.
[0025] In one possible implementation, the model to be trained is used to: process the first BEV feature and / or the second BEV feature based on a deformable attention mechanism based on a preset third BEV feature to obtain a fourth BEV feature; add the third BEV feature and the fourth BEV feature to obtain a fifth BEV feature; process the fifth BEV feature based on a hybrid expert model to obtain a sixth BVE feature; add the fifth BEV feature and the sixth BEV feature to obtain a seventh BEV feature; and obtain a feature fusion result based on the seventh BVE feature.
[0026] In one possible implementation, the model to be trained is used to: process the preset third BVE feature based on the first multi-layer perceptron to obtain the first position information of the first sub-feature of the first BEV feature and / or the second position information of the second sub-feature of the second BEV feature; obtain the first sub-feature and / or the second sub-feature from the first BEV feature and / or the second BEV feature based on the first position information and / or the second position information; process the third BVE feature based on the second multi-layer perceptron to obtain the first weight information of the first sub-feature of the first BEV feature and / or the second weight information of the second sub-feature of the second BEV feature; and perform weighted summation of the first sub-feature and / or the second sub-feature based on the first weight information and / or the second weight information to obtain the fourth BEV feature.
[0027] In one possible implementation, the model to be trained is used to: process the fifth BEV feature based on the first expert model to obtain the eighth BEV feature; process the fifth BEV feature based on the second expert model to obtain the ninth BEV feature; and process the eighth BEV feature and the ninth BEV feature based on the third expert model to obtain the sixth BEV feature.
[0028] In one possible implementation, the model to be trained is used to: divide the fifth BEV feature into multiple third sub-features; divide the fifth BEV feature into multiple fourth sub-features; process the multiple third sub-features and the multiple fourth sub-features based on multiple fourth expert models to obtain multiple fifth sub-features, wherein the processing based on one fourth expert model corresponds to at least one third sub-feature and at least one fourth sub-feature; and add the multiple fifth sub-features to obtain a sixth BVE feature.
[0029] In one possible implementation, the point cloud data is data collected when the lidar is interfered with, and the image data is data collected when the camera is interfered with.
[0030] A third aspect of an embodiment of the present application provides a scene perception device, which includes a target model and comprises: a first acquisition module for acquiring image data of a target scene and / or point cloud data of a target scene; a feature extraction module for performing feature extraction on the image data and / or point cloud data to obtain a first BEV feature of the image data and / or a second BEV feature of the point cloud data; a feature fusion module for performing feature fusion on the first BEV feature and / or the second BEV feature based on a preset third BEV feature to obtain a feature fusion result; and a second acquisition module for acquiring a perception result of the target scene based on the feature fusion result.
[0031] As can be seen from the above device, when scene perception of a target scene is required, image data and / or point cloud data of the target scene can be first acquired and input into the target model. Next, the target model can perform feature extraction on the image data and / or point cloud data to obtain a first BEV feature from the image data and / or a second BEV feature from the point cloud data. The target model can then use a preset third BEV feature to perform feature fusion on the first BEV feature and / or the second BEV feature to obtain a feature fusion result. Finally, the target model can further process the feature fusion result to obtain a perception result of the target scene. At this point, scene perception of the target scene is complete. In the aforementioned process, the target model can fuse the third BEV feature with the first BEV feature of the target scene's image data to obtain a feature fusion result, or fuse the third BEV feature with the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, or fuse the third BEV feature, the first BEV feature of the target scene's image data, and the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, so as to use the feature fusion result to obtain the scene's perception result. It can be seen from this that there is no strong coupling between the target scene's image data and the target scene's point cloud data input to the target model. Even if, due to certain special circumstances, the target model only obtains the target scene's image data or only obtains the target scene's point cloud data, the target model's final perception result of the target scene can still be highly accurate.
[0032] In one possible implementation, the feature extraction module is used to encode the image data and / or the point cloud data to obtain a first BEV feature of the image data and / or a second BEV feature of the point cloud data.
[0033] In one possible implementation, the feature fusion module is used to: based on a preset third BVE feature, process the first BEV feature and / or the second BEV feature based on a deformable attention mechanism to obtain a fourth BEV feature; add the third BEV feature and the fourth BEV feature to obtain a fifth BEV feature; process the fifth BEV feature based on a hybrid expert model to obtain a sixth BVE feature; add the fifth BEV feature and the sixth BEV feature to obtain a seventh BEV feature; and obtain a feature fusion result based on the seventh BVE feature.
[0034] In one possible implementation, the feature fusion module is used to: process the preset third BVE feature based on the first multi-layer perceptron to obtain the first position information of the first sub-feature of the first BEV feature and / or the second position information of the second sub-feature of the second BEV feature; obtain the first sub-feature and / or the second sub-feature from the first BEV feature and / or the second BEV feature based on the first position information and / or the second position information; process the third BVE feature based on the second multi-layer perceptron to obtain the first weight information of the first sub-feature of the first BEV feature and / or the second weight information of the second sub-feature of the second BEV feature; and perform weighted summation of the first sub-feature and / or the second sub-feature based on the first weight information and / or the second weight information to obtain the fourth BEV feature.
[0035] In one possible implementation, the feature fusion module is used to: process the fifth BEV feature based on the first expert model to obtain the eighth BEV feature; process the fifth BEV feature based on the second expert model to obtain the ninth BEV feature; and process the eighth BEV feature and the ninth BEV feature based on the third expert model to obtain the sixth BEV feature.
[0036] In one possible implementation, the feature fusion module is used to: divide the fifth BEV feature into multiple third sub-features; divide the fifth BEV feature into multiple fourth sub-features; process the multiple third sub-features and the multiple fourth sub-features based on multiple fourth expert models to obtain multiple fifth sub-features, wherein the processing based on one fourth expert model corresponds to at least one third sub-feature and at least one fourth sub-feature; and add the multiple fifth sub-features to obtain a sixth BVE feature.
[0037] In one possible implementation, the point cloud data is data collected when the lidar is interfered with, and the image data is data collected when the camera is interfered with.
[0038] A fourth aspect of an embodiment of the present application provides a model training device, which includes: an acquisition module for acquiring image data of a target scene and / or point cloud data of a target scene; a processing module for processing the image data and / or point cloud data through a model to be trained to obtain a perception result of the target scene, wherein the model to be trained is used to: perform feature extraction on the image data and / or point cloud data to obtain a first BEV feature of the image data and / or a second BEV feature of the point cloud data; perform feature fusion on the first BEV feature and / or the second BEV feature based on a preset third BEV feature to obtain a feature fusion result; obtain the perception result of the target scene based on the feature fusion result; and a training module for training the model to be trained based on the perception result of the target scene to obtain a target model.
[0039] The target model trained by the above-mentioned device has a scene perception function. Specifically, when scene perception of the target scene is required, the image data of the target scene and / or the point cloud data of the target scene can be obtained first, and the image data and / or the point cloud data can be input into the target model. Next, the target model can first perform feature extraction on the image data and / or the point cloud data to obtain the first BEV feature of the image data and / or the second BEV feature of the point cloud data. Then, the target model can use the preset third BEV feature to perform feature fusion on the first BEV feature and / or the second BEV feature to obtain a feature fusion result. Finally, the target model can further process the feature fusion result to obtain the perception result of the target scene. At this point, the scene perception of the target scene is completed. In the aforementioned process, the target model can fuse the third BEV feature with the first BEV feature of the target scene's image data to obtain a feature fusion result, or fuse the third BEV feature with the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, or fuse the third BEV feature, the first BEV feature of the target scene's image data, and the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, so as to use the feature fusion result to obtain the scene's perception result. It can be seen from this that there is no strong coupling between the target scene's image data and the target scene's point cloud data input to the target model. Even if, due to certain special circumstances, the target model only obtains the target scene's image data or only obtains the target scene's point cloud data, the target model's final perception result of the target scene can still be highly accurate.
[0040] In one possible implementation, the model to be trained is used to encode image data and / or point cloud data to obtain a first BEV feature of the image data and / or a second BEV feature of the point cloud data.
[0041] In one possible implementation, the model to be trained is used to: process the first BEV feature and / or the second BEV feature based on a deformable attention mechanism based on a preset third BEV feature to obtain a fourth BEV feature; add the third BEV feature and the fourth BEV feature to obtain a fifth BEV feature; process the fifth BEV feature based on a hybrid expert model to obtain a sixth BVE feature; add the fifth BEV feature and the sixth BEV feature to obtain a seventh BEV feature; and obtain a feature fusion result based on the seventh BVE feature.
[0042] In one possible implementation, the model to be trained is used to: process the preset third BVE feature based on the first multi-layer perceptron to obtain the first position information of the first sub-feature of the first BEV feature and / or the second position information of the second sub-feature of the second BEV feature; obtain the first sub-feature and / or the second sub-feature from the first BEV feature and / or the second BEV feature based on the first position information and / or the second position information; process the third BVE feature based on the second multi-layer perceptron to obtain the first weight information of the first sub-feature of the first BEV feature and / or the second weight information of the second sub-feature of the second BEV feature; and perform weighted summation of the first sub-feature and / or the second sub-feature based on the first weight information and / or the second weight information to obtain the fourth BEV feature.
[0043] In one possible implementation, the model to be trained is used to: process the fifth BEV feature based on the first expert model to obtain the eighth BEV feature; process the fifth BEV feature based on the second expert model to obtain the ninth BEV feature; and process the eighth BEV feature and the ninth BEV feature based on the third expert model to obtain the sixth BEV feature.
[0044] In one possible implementation, the model to be trained is used to: divide the fifth BEV feature into multiple third sub-features; divide the fifth BEV feature into multiple fourth sub-features; process the multiple third sub-features and the multiple fourth sub-features based on multiple fourth expert models to obtain multiple fifth sub-features, wherein the processing based on one fourth expert model corresponds to at least one third sub-feature and at least one fourth sub-feature; and add the multiple fifth sub-features to obtain a sixth BVE feature.
[0045] In one possible implementation, the point cloud data is data collected when the lidar is interfered with, and the image data is data collected when the camera is interfered with.
[0046] A fifth aspect of an embodiment of the present application provides a scene perception device, which includes a memory and a processor; the memory stores code, and the processor is configured to execute the code. When the code is executed, the scene perception device executes the method described in the first aspect or any possible implementation method of the first aspect.
[0047] A sixth aspect of an embodiment of the present application provides a model training device, which includes a memory and a processor; the memory stores code, and the processor is configured to execute the code. When the code is executed, the model training device executes the method described in the second aspect or any possible implementation method of the second aspect.
[0048] A seventh aspect of an embodiment of the present application provides a circuit system, which includes a processing circuit, and the processing circuit is configured to execute the method described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.
[0049] An eighth aspect of an embodiment of the present application provides a chip system, which includes a processor for calling a computer program or computer instructions stored in a memory so that the processor executes a method as described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.
[0050] In a possible implementation, the processor is coupled to the memory through an interface.
[0051] In one possible implementation, the chip system further includes a memory, in which a computer program or computer instructions is stored.
[0052] A ninth aspect of an embodiment of the present application provides a computer storage medium storing a computer program, which, when executed by a computer, enables the computer to implement the method described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.
[0053] A tenth aspect of an embodiment of the present application provides a computer program product, which stores instructions that, when executed by a computer, enable the computer to implement the method described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.
[0054] In an embodiment of the present application, when scene perception of a target scene is required, the image data of the target scene and / or the point cloud data of the target scene may be obtained first, and the image data and / or the point cloud data may be input into the target model. Next, the target model may first perform feature extraction on the image data and / or the point cloud data, thereby obtaining a first BEV feature of the image data and / or a second BEV feature of the point cloud data. Then, the target model may use a preset third BEV feature to perform feature fusion on the first BEV feature and / or the second BEV feature, thereby obtaining a feature fusion result. Finally, the target model may further process the feature fusion result to obtain a perception result of the target scene. At this point, scene perception of the target scene is completed. In the aforementioned process, the target model can fuse the third BEV feature with the first BEV feature of the target scene's image data to obtain a feature fusion result, or fuse the third BEV feature with the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, or fuse the third BEV feature, the first BEV feature of the target scene's image data, and the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, so as to use the feature fusion result to obtain the scene's perception result. It can be seen from this that there is no strong coupling between the target scene's image data and the target scene's point cloud data input to the target model. Even if, due to certain special circumstances, the target model only obtains the target scene's image data or only obtains the target scene's point cloud data, the target model's final perception result of the target scene can still be highly accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 is a schematic diagram of the structure of the artificial intelligence main framework;
[0056] FIG2a is a schematic structural diagram of a scene perception system provided in an embodiment of the present application;
[0057] FIG2 b is another structural diagram of the scene perception system provided in an embodiment of the present application;
[0058] FIG2c is a schematic diagram of a scene perception-related device provided in an embodiment of the present application;
[0059] FIG3 is a schematic diagram of the architecture of the system 100 provided in an embodiment of the present application;
[0060] FIG4 is a schematic diagram of a structure of a target model provided in an embodiment of the present application;
[0061] FIG5 is a flow chart of a scene perception method provided in an embodiment of the present application;
[0062] FIG6 is a schematic diagram of a structure of a feature extraction module provided in an embodiment of the present application;
[0063] FIG7 is a schematic structural diagram of a feature fusion module provided in an embodiment of the present application;
[0064] FIG8 is a schematic structural diagram of a first fusion unit provided in an embodiment of the present application;
[0065] FIG9 is a schematic structural diagram of a second fusion unit provided in an embodiment of the present application;
[0066] FIG10 is a schematic diagram of the structure of a cross-modal deformable attention layer of a first fusion unit provided in an embodiment of the present application;
[0067] FIG11 is a structural diagram of a hybrid expert layer of a first fusion unit provided in an embodiment of the present application;
[0068] FIG12 is another structural diagram of the hybrid expert layer of the first first fusion unit provided in an embodiment of the present application;
[0069] FIG13 is another schematic structural diagram of the first fusion unit provided in an embodiment of the present application;
[0070] FIG14 is a flow chart of a model training method provided in an embodiment of the present application;
[0071] FIG15 is a schematic structural diagram of a scene perception device provided in an embodiment of the present application;
[0072] FIG16 is a schematic structural diagram of a model training device provided in an embodiment of the present application;
[0073] FIG17 is a schematic diagram of the structure of an execution device provided in an embodiment of the present application;
[0074] FIG18 is a schematic structural diagram of a training device provided in an embodiment of the present application;
[0075] FIG19 is a schematic structural diagram of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0076] The embodiments of the present application provide a scene perception method and related equipment. Even if the target model only obtains image data of the target scene or only obtains point cloud data of the target scene, the target model can still obtain relatively accurate perception results of the target scene.
[0077] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0078] In the field of autonomous driving, in order for a vehicle's autonomous driving system to make accurate autonomous driving decisions, it is often necessary for the vehicle's autonomous driving system to have high-precision scene (environment) perception capabilities. Generally, the autonomous driving system obtains scene information through the vehicle's sensors and uses this information to obtain scene perception results.
[0079] In related technologies, vehicle sensors typically include cameras and lidar. When a vehicle's autonomous driving system needs to perceive the surrounding scene, it first collects image data of the scene through the camera and point cloud data of the scene through the lidar. This data is then fed into a neural network model built into the system. The neural network model then extracts features from the image data and the point cloud data, then fuses these features to obtain a scene perception result based on the feature fusion results.
[0080] In the above process, the neural network model needs to fuse the features of the image data and the features of the point cloud data to use the feature fusion results to obtain the perception results of the scene. It can be seen that there is a strong coupling between the image data and the point cloud data input to the neural network model. In some special cases (for example, when the camera or lidar fails, etc.), if a part of the data cannot be obtained (for example, the camera cannot successfully obtain image data or the lidar cannot successfully obtain point cloud data, etc.), the perception results of the scene finally obtained by the neural network model will be inaccurate.
[0081] Furthermore, if the quality of the acquired data is low (for example, the field of view of the lidar is limited, resulting in the inability to obtain all-round point cloud data, etc.), that is, there is a certain loss in the acquired data, this will also cause the perception results of the scene finally obtained by the neural network model to be inaccurate.
[0082] In order to solve the above problems, the embodiment of the present application provides a scene perception method, which can be implemented in combination with artificial intelligence (AI) technology. AI technology is a technical discipline that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence. AI technology obtains the best results by perceiving the environment, acquiring knowledge and using knowledge. In other words, artificial intelligence technology is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Using artificial intelligence for data processing is a common application of artificial intelligence.
[0083] First, we will describe the overall workflow of an AI system. See Figure 1, which illustrates a schematic diagram of the AI framework. This framework will be explained from two perspectives: the "intelligent information chain" (horizontal axis) and the "IT value chain" (vertical axis). The "intelligent information chain" reflects the entire process from data acquisition to processing. For example, it could be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. Throughout this process, data undergoes a condensed journey from "data-information-knowledge-wisdom." The "IT value chain," spanning the underlying infrastructure of human intelligence, information (provided and processed by technology), and the system's industrial ecosystem, reflects the value that AI brings to the information technology industry.
[0084] (1) Infrastructure
[0085] Infrastructure provides computing power for AI systems, enabling communication with the outside world and supporting this through a foundational platform. External communication occurs through sensors; computing power is provided by intelligent chips (CPUs, NPUs, GPUs, ASICs, FPGAs, and other hardware accelerators). The foundational platform includes a distributed computing framework and network-related platform guarantees and support, including cloud storage and computing, and interconnected networks. For example, sensors communicate with the outside world to acquire data, which is then fed into the intelligent chips within the distributed computing system provided by the foundational platform for computation.
[0086] (2) Data
[0087] Data above the infrastructure layer represents data sources for AI. This data includes graphics, images, voice, and text, as well as IoT data from traditional devices. This includes business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.
[0088] (3) Data processing
[0089] Data processing generally includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.
[0090] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.
[0091] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.
[0092] Decision-making refers to the process of making decisions after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.
[0093] (4) General ability
[0094] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.
[0095] (5) Smart products and industry applications
[0096] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart terminals, smart transportation, smart medical care, autonomous driving, smart cities, etc.
[0097] Next, several application scenarios of this application are introduced.
[0098] Figure 2a is a schematic diagram of the structure of a scene perception system provided in an embodiment of the present application. The scene perception system includes a user device and a data processing device. The user device includes a user's mobile phone, an onboard computer in a vehicle driven by the user, and other intelligent terminals. The user device is the initiator of scene perception and, as the initiator of a scene perception request, is typically initiated by the user through the user device.
[0099] The aforementioned data processing device can be a device or server with data processing capabilities, such as a cloud server, network server, application server, or management server. The data processing device receives scene perception requests from smart terminals via an interactive interface and then performs scene perception through machine learning, deep learning, search, reasoning, and decision-making through its memory and data processing processors. The memory in the data processing device is a general term that includes local storage and databases storing historical data. The database can be located on the data processing device or on other network servers.
[0100] In the scene perception system shown in FIG2a, a user device can obtain relevant data of a target scene specified by a user, and then initiate a request to a data processing device, so that the data processing device performs scene perception processing on the relevant data of the target scene from the user device, thereby obtaining a perception result for the target scene. Exemplarily, when a user triggers the user device, the user device can obtain relevant data of the target scene (e.g., image data of the target scene and / or point cloud data of the target scene, etc.) (through sensors, such as cameras and / or lidars, etc.), and then the user device can initiate a scene perception request to the data processing device, so that the data processing device performs a series of processing on the relevant data of the target scene based on the scene perception request, thereby obtaining a perception result of the target scene, such as a detection result for objects in the target scene (e.g., pedestrians, adjacent vehicles, lane lines, etc.) or a segmentation result for objects in the target scene, etc.
[0101] In FIG2 a , the data processing device may execute the scene perception method according to an embodiment of the present application.
[0102] Figure 2b is another structural diagram of the scene perception system provided in an embodiment of the present application. In Figure 2b, the user device directly serves as a data processing device. The user device can directly obtain input from the user and directly process it by the hardware of the user device itself. The specific process is similar to that of Figure 2a. Please refer to the above description and will not be repeated here.
[0103] In the scene perception system shown in FIG2b , when the user triggers the user device, the user device can obtain relevant data of the target scene, and then the user device can perform a series of processing on the relevant data of the target scene to obtain perception results of the target scene, such as object detection results in the target scene or object segmentation results in the target scene, etc.
[0104] In FIG2b , the user equipment itself can execute the scene perception method of the embodiment of the present application.
[0105] FIG2c is a schematic diagram of a scene perception related device provided in an embodiment of the present application.
[0106] The user device in the above Figures 2a and 2b can specifically be the local device 301 or the local device 302 in Figure 2c, and the data processing device in Figure 2a can specifically be the execution device 210 in Figure 2c, wherein the data storage system 250 can store the data to be processed of the execution device 210, and the data storage system 250 can be integrated on the execution device 210, or it can be set on the cloud or other network servers.
[0107] The processors in Figures 2a and 2b can perform data training / machine learning / deep learning through a neural network model or other models (for example, a model based on a support vector machine), and use the model finally trained or learned from the data to perform scene perception applications on the image, thereby obtaining corresponding processing results.
[0108] Figure 3 is a schematic diagram of the system 100 architecture provided in an embodiment of the present application. In Figure 3, the execution device 110 is configured with an input / output (I / O) interface 112 for data interaction with an external device. The user can input data to the I / O interface 112 through the client device 140. The input data can include: various tasks to be scheduled, callable resources and other parameters in the embodiment of the present application.
[0109] When the execution device 110 preprocesses the input data, or when the computing module 111 of the execution device 110 performs calculations and other related processing (such as implementing the functions of the neural network in this application), the execution device 110 can call the data, code, etc. in the data storage system 150 for the corresponding processing, and can also store the data, instructions, etc. obtained from the corresponding processing in the data storage system 150.
[0110] Finally, the I / O interface 112 returns the processing result to the client device 140 so as to provide it to the user.
[0111] It is worth noting that the training device 120 can generate corresponding target models / rules based on different training data for different goals or tasks. The corresponding target models / rules can be used to achieve the above goals or complete the above tasks, thereby providing the user with the desired results. The training data can be stored in the database 130 and come from training samples collected by the data collection device 160.
[0112] In the scenario shown in FIG3 , the user can manually input data, which can be performed through the interface provided by I / O interface 112. Alternatively, client device 140 can automatically send input data to I / O interface 112. If user authorization is required for client device 140 to automatically send input data, the user can set the corresponding permissions in client device 140. The user can view the output of execution device 110 on client device 140, which can be presented in a display, sound, action, or other specific form. Client device 140 can also serve as a data acquisition terminal, collecting input data and output results from I / O interface 112 as new sample data and storing them in database 130. Of course, collection can also be performed without client device 140, with I / O interface 112 directly storing the input data and output results from I / O interface 112 as new sample data in database 130.
[0113] It is worth noting that FIG3 is only a schematic diagram of a system architecture provided by an embodiment of the present application, and the positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. For example, in FIG3, the data storage system 150 is an external memory relative to the execution device 110. In other cases, the data storage system 150 can also be placed in the execution device 110. As shown in FIG3, a neural network can be trained according to the training device 120.
[0114] The present application also provides a chip including a neural network processor (NPU). The chip can be provided in the execution device 110 shown in FIG3 to complete the computational work of the computation module 111. The chip can also be provided in the training device 120 shown in FIG3 to complete the training work of the training device 120 and output the target model / rule.
[0115] The neural network processor (NPU) is a coprocessor mounted on the host central processing unit (CPU), which assigns tasks to it. The core of the NPU is the arithmetic circuit, which is controlled by a controller to extract data from memory (weight memory or input memory) and perform calculations.
[0116] In some implementations, the arithmetic circuit includes multiple processing engines (PEs). In some implementations, the arithmetic circuit is a two-dimensional systolic array. The arithmetic circuit can also be a one-dimensional systolic array or other electronic circuit capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit is a general-purpose matrix processor.
[0117] For example, consider an input matrix A, a weight matrix B, and an output matrix C. The computational circuit retrieves the corresponding data for matrix B from the weight memory and caches it on each PE within the computational circuit. The computational circuit then performs a matrix operation on the matrix A data from the input memory and matrix B, storing the partial or final matrix results in the accumulator.
[0118] The vector computation unit can further process the output of the arithmetic circuit, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. For example, the vector computation unit can be used for network calculations in non-convolutional / non-FC layers in neural networks, such as pooling, batch normalization, and local response normalization.
[0119] In some implementations, the vector computation unit can store the processed output vectors in a unified buffer. For example, the vector computation unit can apply a nonlinear function to the output of the computation circuit, such as a vector of accumulated values, to generate activation values. In some implementations, the vector computation unit generates normalized values, merged values, or both. In some implementations, the processed output vectors can be used as activation inputs to the computation circuit, such as for use in subsequent layers in a neural network.
[0120] The unified memory is used to store input data and output data.
[0121] The weight data is directly transferred from the external memory to the input memory and / or unified memory through the direct memory access controller (DMAC), the weight data in the external memory is stored in the weight memory, and the data in the unified memory is stored in the external memory.
[0122] The bus interface unit (BIU) is used to implement interaction between the main CPU, DMAC and instruction fetch memory through the bus.
[0123] An instruction fetch buffer connected to the controller, used to store instructions used by the controller;
[0124] The controller is used to call the instructions cached in the memory to control the working process of the computing accelerator.
[0125] Generally, unified memory, input memory, weight memory and instruction fetch memory are all on-chip memories, and external memory is memory outside the NPU, which can be double data rate synchronous dynamic random access memory (DDR SDRAM), high bandwidth memory (HBM) or other readable and writable memory.
[0126] Since the embodiments of the present application involve the application of a large number of neural networks, in order to facilitate understanding, the relevant terms and related concepts such as neural networks involved in the embodiments of the present application are first introduced below.
[0127] (1) Neural Network
[0128] A neural network can be composed of neural units. A neural unit can refer to an operation unit with xs and intercept 1 as input. The output of the operation unit can be:
[0129] Where s = 1, 2, ... n, n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into the output signal. The output signal of the activation function can be used as the input of the next convolutional layer. The activation function can be a sigmoid function. A neural network is a network formed by connecting many of the above-mentioned single neural units together, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field. The local receptive field can be an area composed of several neural units.
[0130] The operation of each layer in a neural network can be described by the mathematical expression y = a(Wx + b). From a physical perspective, the operation of each layer in a neural network can be understood as transforming the input space (a set of input vectors) into the output space (i.e., from the row space to the column space of a matrix) through five operations. These operations include: 1. Dimensionality increase / decrease; 2. Scaling / reduction; 3. Rotation; 4. Translation; and 5. "Bending." Operations 1, 2, and 3 are performed by Wx, 4 by +b, and 5 by a(). The word "space" is used here because the objects being classified are not individual things, but rather a class of things, and space refers to the collection of all individuals within that class. W is the weight vector, each value in which represents the weight of a neuron in that layer of the neural network. This vector W determines the spatial transformation from input space to output space described above. That is, the weights W of each layer control how the space is transformed. The goal of training a neural network is to ultimately obtain the weight matrix for all layers of the trained neural network (a weight matrix formed by the vectors W of many layers). Therefore, the training process of a neural network is essentially about learning how to control spatial transformations, and more specifically, about learning the weight matrix.
[0131] Because we want the output of the neural network to be as close as possible to the value we really want to predict, we can compare the current network's predicted value with the desired target value, and then update the weight vector of each layer of the neural network based on the difference between the two (of course, there is usually an initialization process before the first update, which is to pre-configure the parameters for each layer in the neural network). For example, if the network's predicted value is too high, the weight vector is adjusted to make it predict a lower value, and this adjustment is continued until the neural network can predict the desired target value. Therefore, it is necessary to pre-define "how to compare the difference between the predicted value and the target value." This is the loss function or objective function, which is an important equation used to measure the difference between the predicted value and the target value. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so the training of the neural network becomes a process of minimizing this loss as much as possible.
[0132] (2) Backpropagation algorithm
[0133] Neural networks can use the back propagation (BP) algorithm to correct the size of the parameters in the initial neural network model during training, reducing the reconstruction error loss of the neural network model. Specifically, the forward propagation of the input signal to the output generates error loss. This error loss information is then backpropagated to update the parameters in the initial neural network model, thereby converging the error loss. The BP algorithm is a backward propagation movement dominated by error loss, aiming to obtain the optimal parameters of the neural network model, such as the weight matrix.
[0134] (3) Bird’s-eye view
[0135] The bird's-eye view (BEV) image is a natural and straightforward candidate for a unified representation. Compared to the front view or perspective view, which have been widely studied in the field of two-dimensional vision, the BEV representation has several inherent advantages. First, BEV does not suffer from the occlusion and scale issues common in two-dimensional tasks. In the field of autonomous driving, BEV can better solve problems such as identifying vehicles in the presence of occlusions or cross traffic. Furthermore, representing objects or road elements in this BEV format facilitates the development and deployment of subsequent modules (such as planning and control).
[0136] The method provided in this application is described below from the training side of the neural network and the application side of the neural network.
[0137] The model training method provided in the embodiment of the present application involves the processing of data sequences, and can be specifically applied to methods such as data training, machine learning, and deep learning, and performs symbolic and formalized intelligent information modeling, extraction, preprocessing, and training on the training data (for example, the image data of the target scene and / or the point cloud data of the target scene in the model training method provided in the embodiment of the present application), and finally obtains a trained neural network (for example, the target model in the model training method provided in the embodiment of the present application); and the scene perception method provided in the embodiment of the present application can use the above-mentioned trained neural network to input the input data (for example, the image data of the target scene and / or the point cloud data of the target scene in the scene perception method provided in the embodiment of the present application) into the trained neural network to obtain output data (for example, the perception result of the target scene in the scene perception method provided in the embodiment of the present application). It should be noted that the model training method and scene perception method provided in the embodiment of the present application are inventions based on the same concept, and can also be understood as two parts in a system, or two stages of an overall process: such as the model training stage and the model application stage.
[0138] The scene perception method provided in the embodiment of the present application can be applied not only to scenarios such as object detection and object segmentation in the field of autonomous driving, but also to more scenarios such as robot route planning in the field of logistics and transportation, which are not limited here. The scene perception method provided in the embodiment of the present application can be implemented through a target model. Figure 4 is a structural schematic diagram of the target model provided in the embodiment of the present application. As shown in Figure 4, the target model includes: a feature extraction module, a feature fusion module and a prediction module, wherein the input end of the feature extraction module serves as the input end of the entire target model, the output end of the feature extraction module is connected to the input end of the feature fusion module, the output end of the feature fusion module is connected to the output end of the prediction module, and the output end of the prediction module serves as the output end of the entire target model. In order to understand the workflow of the target model, the workflow of the target model is introduced below in conjunction with Figure 5. Figure 5 is a flow chart of the scene perception method provided in the embodiment of the present application. As shown in Figure 5, the method includes:
[0139] 501. Acquire image data of a target scene and / or point cloud data of a target scene.
[0140] In this embodiment, when scene perception is required for a target scene, image data of the target scene may be collected by a camera and / or point cloud data of the target scene may be collected by a lidar.
[0141] Specifically, when collecting data, there are usually the following situations:
[0142] (1) The user indicates that the image data of the target scene and the point cloud data of the target scene need to be acquired simultaneously, and the camera and the lidar are in working state, so the image data of the target scene can be acquired by the camera, and the point cloud data of the target scene can be acquired by the lidar.
[0143] (2) The user indicates that it is necessary to simultaneously obtain the image data and the point cloud data of the target scene, but only the camera is in working condition and the lidar is in a faulty condition. Therefore, only the image data of the target scene can be collected by the camera, and the point cloud data of the target scene cannot be collected by the lidar.
[0144] (3) The user indicates that it is necessary to simultaneously obtain the image data and the point cloud data of the target scene, but only the lidar is in working condition and the camera is in a faulty condition. Therefore, only the point cloud data of the target scene can be collected by the lidar, and the image data of the target scene cannot be collected by the camera.
[0145] (4) The user indicates that only the image data of the target scene needs to be acquired, and the camera is in working state, so only the image data of the target scene is collected through the camera, and the point cloud data of the target scene is not collected through the lidar.
[0146] (5) The user indicates that only the point cloud data of the target scene needs to be acquired, and the lidar is in working state, so only the point cloud data of the target scene is collected through the lidar, and the image data of the target scene is not collected through the camera, etc.
[0147] Furthermore, the image data of the target scene acquired in the above-mentioned various situations may be data collected by the camera without interference (in which case the collected image data is of normal quality) or data collected by the camera with interference (in which case the collected image data is of poor quality). The situation where the camera is interfered with includes the following situations:
[0148] (1) View noise (VN): A camera's view noise can be caused by a variety of factors, including sensor noise, electrical interference, atmospheric conditions, or compression artifacts. This embodiment simulates the camera's view noise by replacing a portion of the data collected by the camera with randomly generated noise. This results in data collected by the camera in the presence of view noise, i.e., image data with noise.
[0149] (2) View drop (VD): View drop can be caused by a variety of factors, including incorrect camera positioning or hardware failure. Similar to camera view noise, this embodiment sets a portion of the camera data to zero. This allows us to obtain data collected by the camera with view drop, i.e., image data with defective (incomplete) content.
[0150] (3) Obstacle occlusion (OO): This refers to a phenomenon that occurs when an object in the target scene is partially obscured by an obstacle or occluder. To simulate this phenomenon, this embodiment uses a set of predefined masks to perform alpha blending on the data collected by the camera. This allows us to obtain the data collected by the camera in the presence of an obstacle, that is, the image data with occlusion.
[0151] Furthermore, the point cloud data of the target scene obtained in the above-mentioned various situations can be data collected by the LiDAR without interference (in which case the collected point cloud data is of normal quality) or data collected by the LiDAR with interference (in which case the collected point cloud data is of poor quality). Among them, the situation where the LiDAR is interfered with includes the following situations:
[0152] (1) Limited field (LF): Generally, point cloud data is collected from a 360-degree viewing angle. However, due to hardware failures of the LiDAR and other reasons, point cloud data at certain angles may be lost, resulting in the collection angle of point cloud data being less than 360 degrees. In this embodiment, point cloud data with missing angles can be simulated, including 360, 240, 180, 120 degrees, etc. In this way, the data collected by the LiDAR in the presence of a limited field of view can be obtained, that is, point cloud data with missing collection angles.
[0153] (2) Missing objects (MO): In the real world, differences in factors such as the color and surface material of objects may result in a reduction in the number of reflection points detected by the LiDAR. In this embodiment, the point cloud data of missing objects is simulated by deleting object point cloud data with a certain ratio with a certain probability. The selected ratio is set to 0.0, 0.1, 0.3, 0.5, 0.7, 1.0, etc. In this way, the data collected by the LiDAR in the presence of missing objects can be obtained, that is, the point cloud data of the object is partially missing.
[0154] (3) Beam reduction (BR): Beam reduction is a phenomenon that occurs in perception systems when the available power supply or processing power of the LiDAR is limited. This embodiment simulates point cloud data with fewer beams by reducing the number of beams of the LiDAR by 1, 4, 8, 16, and 32 for data collection and evaluation. In this way, the data collected by the LiDAR in the presence of beam reduction, that is, the point cloud data with fewer beams, etc., can be obtained.
[0155] After obtaining the image data of the target scene and / or the point cloud data of the target scene, the image data of the target scene and / or the point cloud data of the target scene may be input into the target model.
[0156] 502. Perform feature extraction on the image data and / or the point cloud data to obtain a first BEV feature of the image data and / or a second BEV feature of the point cloud data.
[0157] After obtaining the image data of the target scene and / or the point cloud data of the target scene, the target model can perform feature extraction on the image data of the target scene and / or the point cloud data of the target scene, thereby obtaining a first BEV feature of the image data and / or a second BEV feature of the point cloud data.
[0158] Specifically, the feature extraction module of the target model may include a first encoder and a second encoder. Then, the target model may obtain the first BEV feature of the image data and / or the second BEV feature of the point cloud data in the following manner:
[0159] If the data input to the target model includes both image data and point cloud data of the target scene, in the feature extraction module of the target model, the first encoder may encode the image data of the target scene to obtain first BEV features of the image data and send first RVE features to the feature fusion module, and the second encoder may encode the point cloud data of the target scene to obtain second BEV features of the point cloud data and send second RVE features to the feature fusion module. If the data input to the target model only includes image data of the target scene, in the feature extraction module of the target model, the first encoder may encode the image data of the target scene to obtain only first BEV features of the image data and send first RVE features to the feature fusion module. If the data input to the target model only includes point cloud data of the target scene, in the feature extraction module of the target model, the second encoder may encode the point cloud data of the target scene to obtain only second BEV features of the point cloud data and send second RVE features to the feature fusion module.
[0160] For example, as shown in Figure 6 (Figure 6 is a structural diagram of the feature extraction module provided in an embodiment of the present application), after the image captured by the camera and the point cloud captured by the lidar are input into the feature extraction module of the target model, in the feature extraction module, the first encoder can encode the image to obtain the BEV feature B1 of the image, and at the same time, the second encoder can encode the point cloud to obtain the BEV feature B2 of the point cloud. Then, the first encoder can send B1 to the feature fusion module, and the second encoder can send B2 to the feature fusion module.
[0161] The first encoder generates multiple 2D features of the image, maps these 2D features into a discrete 3D space using camera intrinsic projection, and then compresses these 3D features into the image's BEV features (B1). The second encoder processes the point cloud using voxelization and sparse 3D convolution to generate BEV features (B2).
[0162] 503. Based on the preset third BEV feature, perform feature fusion on the first BEV feature and / or the second BEV feature to obtain a feature fusion result.
[0163] After obtaining the first BEV feature and / or the second BEV feature, the target model may perform feature fusion on the first BEV feature and / or the second BEV feature based on a preset third BEV feature, thereby obtaining a feature fusion result.
[0164] Specifically, the feature fusion module of the target model may include multiple first fusion units and multiple second fusion units connected in series. Then, the target model can obtain the feature fusion result in the following way:
[0165] (1) Then, for the first first fusion unit, the input of the unit includes the preset third BEV feature and also includes the first BEV feature and / or the second BEV feature. For the second first fusion unit, the input of the unit includes the output of the first first fusion unit and also includes the first BEV feature and / or the second BEV feature, ..., for the last first fusion unit, the input of the unit includes the output of the second-to-last first fusion unit and also includes the first BEV feature and / or the second BEV feature. Then, the output of the last first fusion unit can be sent to the first second fusion unit.
[0166] (2) For the first second fusion unit, the input of this unit includes the output of the last first fusion unit. For the second second fusion unit, the input of this unit includes the output of the first second fusion unit, ..., for the last second fusion unit, the input of this unit includes the output of the second-to-last second fusion unit. Then, the output of the last second fusion unit can be used as the feature fusion result and sent to the prediction module.
[0167] Still taking the above example, as shown in Figure 7 (Figure 7 is a structural diagram of the feature fusion module provided in an embodiment of the present application, and Figure 7 is drawn on the basis of Figure 6), it is assumed that the feature fusion module includes three first fusion units and two second fusion units connected in series. Then, the input of the first first fusion unit is B1, B2 and the preset BVE feature B3, and the output of the first first fusion unit is B7. The input of the second first fusion unit is B7, B2 and B3, and the output of the second first fusion unit is B11. The input of the third first fusion unit is B11, B2 and B3, and the output of the third first fusion unit is B15. The input of the first second fusion unit is B15, and the output of the first second fusion unit is B19. The input of the second second fusion unit is B19, and the output of the second second fusion unit is B23, which is the feature fusion result, so the second second fusion unit can send B23 to the prediction module.
[0168] More specifically, in the feature fusion module, each first fusion unit includes a cross-modal deformable attention layer, a first addition layer, a mixture of experts (MoE) layer, and a second addition layer. The first fusion unit can then obtain its corresponding output in the following manner (since the structures of all first fusion units are the same, i.e., the workflows of each first fusion unit are similar, the workflow of the first first fusion unit is used as an example for schematic description below):
[0169] (1.1) In the first first fusion unit, if the features input to the first first fusion unit include both the first BEV feature and the second BEV feature, the cross-modal deformable attention layer may process the first BEV feature and the second BEV feature based on the deformable attention mechanism based on the third BVE feature, thereby obtaining a fourth BEV feature. If the features input to the first first fusion unit include only the first BEV feature, the cross-modal deformable attention layer may process the first BEV feature based on the deformable attention mechanism based on the third BVE feature, thereby obtaining a fourth BEV feature. If the features input to the first first fusion unit include only the second BEV feature, the cross-modal deformable attention layer may process the second BEV feature based on the deformable attention mechanism based on the third BVE feature, thereby obtaining a fourth BEV feature. After obtaining the fourth BEV feature, the cross-modal deformable attention layer may send the fourth BEV feature to the first addition layer.
[0170] (1.2) After obtaining the fourth BEV feature, the first addition layer may add the third BEV feature and the fourth BEV feature to obtain the fifth BEV feature. After obtaining the fifth BEV feature, the first addition layer may send the fifth BEV feature to the hybrid expert layer.
[0171] (1.3) After obtaining the fifth BEV feature, the hybrid expert layer may process the fifth BEV feature based on the hybrid expert model to obtain the sixth BVE feature. After obtaining the sixth BEV feature, the hybrid expert layer may send the sixth BEV feature to the second addition layer.
[0172] (1.4) After obtaining the sixth BEV feature, the second addition layer can add the fifth BEV feature and the sixth BEV feature to obtain the seventh BEV feature. After obtaining the seventh BEV feature, the second addition layer can send the seventh BEV feature as the output of the first first fusion unit to the second first fusion unit.
[0173] (1.5) Since the structures of the remaining first fusion units are identical to those of the first, the workflow of the remaining first fusion units can refer to that of the first and will not be repeated here. The last first fusion unit can then send its output to the first second fusion unit.
[0174] Still taking the above example, as shown in Figure 8 (Figure 8 is a structural diagram of the first fusion unit provided in an embodiment of the present application, and Figure 8 is drawn based on Figure 7), the first first fusion unit includes a cross-modal deformable attention layer, a first addition layer, a mixed expert layer and a second addition layer (the second first fusion unit and the third first fusion unit are also the same and will not be repeated here). Since the input of the first first fusion unit is B1, B2 and B3, the cross-modal deformable attention layer can process B1 and B2 based on the deformable attention mechanism based on B3 to obtain the BEV feature B4, and send B4 to the first addition layer. The first addition layer can add B3 and B4 to obtain the BEV feature B5, and send B5 to the mixed expert layer. The mixed expert layer can process B5 based on the mixed expert model to obtain the BVE feature B6, and send B6 to the second addition layer. The second addition layer can add B5 and B6 to obtain the BEV feature B7, and send B7 to the second first fusion unit.
[0175] Then, B7 input to the second first fusion unit is the same as B3 input to the first first fusion unit, so the second first fusion unit can finally obtain BEV feature B11 and send B11 to the third first fusion unit. B11 input to the third first fusion unit is the same as B3 input to the first first fusion unit, so the third first fusion unit can finally obtain BEV feature B15 and send B15 to the first second fusion unit.
[0176] More specifically, in the feature fusion module, each second fusion unit includes a self-attention layer, a first addition layer, a mixture of experts layer, and a second addition layer. The second fusion unit can then obtain its corresponding output in the following manner (since the structures of all second fusion units are the same, i.e., the workflows of each second fusion unit are similar, the workflow of the first second fusion unit is used as an example for schematic description below):
[0177] (2.1) In the first second fusion unit, the input of the first second fusion unit is the output of the last first fusion unit. Since the difference between the second fusion unit and the first fusion unit is that the second fusion unit contains a self-attention layer, while the first fusion unit contains a cross-modal deformable attention layer. Then, in the first second fusion unit, the self-attention layer can first process the output of the last first fusion unit based on the self-attention mechanism, and give the processing result to the first addition layer. After being processed by the first addition layer, the mixed expert layer and the second addition layer in sequence (this process can be referred to the aforementioned (1.2) to (1.4), which will not be repeated here), the output of the first second fusion unit can be finally obtained and sent to the second second fusion unit.
[0178] (2.2) Since the structure of the remaining second fusion units is the same as that of the first second fusion unit, the workflow of the remaining second fusion units can refer to the workflow of the first second fusion unit mentioned above and will not be repeated here. Then, the last second fusion unit can use its output as the feature fusion result and send it to the prediction module.
[0179] Still taking the above example as shown in Figure 9 (Figure 9 is a structural diagram of the second fusion unit provided in an embodiment of the present application, and Figure 9 is drawn on the basis of Figure 8), the first second fusion unit includes a self-attention layer, a first addition layer, a mixed expert layer and a second addition layer (the second second fusion unit is also the same and will not be repeated here). Since the input of the first second fusion unit is B15, the self-attention layer can process B15 based on the self-attention mechanism to obtain the BEV feature B16, and send B16 to the first addition layer. The first addition layer can add B15 and B16 to obtain the BEV feature B17, and send B17 to the mixed expert layer. The mixed expert layer can process B17 based on the mixed expert model to obtain the BVE feature B18, and send B18 to the second addition layer. The second addition layer can add B17 and B18 to obtain the BEV feature B19, and send B19 to the second second fusion unit.
[0180] Then, B19 input to the second second fusion unit is the same as B15 input to the first second fusion unit, so the second second fusion unit can finally obtain the BEV feature B23, and send B23 as the feature fusion result to the prediction module.
[0181] More specifically, in each first fusion unit, the cross-modal deformable attention layer may include a first multi-layer perceptron layer, a second multi-layer perceptron layer, a selection layer, and a computation layer. Then, the first first fusion unit may obtain the fourth BEV feature in the following ways:
[0182] (1.1.1) In the cross-modal deformable attention layer of the first first fusion unit, if the features input to the cross-modal deformable attention layer include both the first BEV feature and the second BEV feature, the first multi-layer perceptron layer may process the third BVE feature based on the first multi-layer perceptron, thereby obtaining first position information of the first sub-feature of the first BEV feature and second position information of the second sub-feature of the second BEV feature. Next, the selection layer may select one or more first sub-features from the first BEV feature and one or more second sub-features from the second BEV feature, as indicated by the first position information and the second position information. Simultaneously, the second multi-layer perceptron layer may also process the third BVE feature based on the second multi-layer perceptron, thereby obtaining first weight information for the first sub-feature and second weight information for the second sub-feature. Finally, the computation layer may use the first and second weight information to perform a weighted sum of the first and second sub-features, thereby obtaining a fourth BEV feature.
[0183] (1.1.2) In the cross-modal deformable attention layer of the first first fusion unit, if the only feature input to the cross-modal deformable attention layer is the first BEV feature, the first multi-layer perceptron layer may process the third BVE feature based on the first multi-layer perceptron, thereby obtaining the first position information of the first sub-feature of the first BEV feature. Next, the selection layer may select the first sub-feature from the first BEV feature according to the indication of the first position information. Simultaneously, the second multi-layer perceptron layer may also process the third BVE feature based on the second multi-layer perceptron, thereby obtaining the first weight information of the first sub-feature. Finally, the computation layer may use the first weight information to perform a weighted summation on the first sub-feature to obtain the fourth BEV feature.
[0184] (1.1.3) In the cross-modal deformable attention layer of the first first fusion unit, if the only feature input to the cross-modal deformable attention layer is the second BEV feature, the first multi-layer perceptron layer may process the third BVE feature based on the first multi-layer perceptron, thereby obtaining the second position information of the second sub-feature of the second BEV feature. Next, the selection layer may select the second sub-feature from the second BEV feature according to the second position information. Simultaneously, the second multi-layer perceptron layer may also process the third BVE feature based on the second multi-layer perceptron, thereby obtaining the second weight information of the second sub-feature. Finally, the computation layer may use the second weight information to perform a weighted summation of the second sub-features to obtain the fourth BEV feature.
[0185] Still taking the above example, as shown in Figure 10 (Figure 10 is a structural diagram of the cross-modal deformable attention layer of the first first fusion unit provided in an embodiment of the present application, and Figure 10 is drawn based on Figure 9), the cross-modal deformable attention layer of the first first fusion unit includes a first multi-layer perceptron layer, a second multi-layer perceptron layer, a selection layer, and a calculation layer (the cross-modal deformable attention layers of the other first fusion units are also the same and will not be repeated here). In the cross-modal deformable attention layer of the first first fusion unit, since the input of the cross-modal deformable attention layer is B1, B2, and B3, the first multi-layer perceptron layer can calculate B3 to obtain the position information of the sub-feature b1 of B1 and the position information of the sub-feature b2 of B2, and provide it to the selection layer. Based on this position information, the selection layer can select b1 from B1 and b2 from B2, and provide it to the calculation layer. At the same time, the second multi-layer perceptron layer can calculate B3 to obtain the weight information of b1 and the weight information of b2, and provide it to the calculation layer. Then, the computing layer can perform weighted summation on b1 and b2 based on these weight information to obtain B4.
[0186] More specifically, in each first fusion unit, the hybrid expert layer can have various structures. For example, the hybrid expert layer includes a first expert model layer, a second expert model layer, and a third expert model layer. Another example is that the hybrid expert layer includes a first router layer, a second router layer, multiple fourth expert model layers, and an addition layer. It should be noted that the expert model layers involved here can be linear layers or convolutional layers, etc. Then, the first first fusion unit can obtain the sixth BEV feature through the following methods:
[0187] (1.3.1) In the hybrid expert layer of the first first fusion unit, the first expert model layer may process the fifth BEV feature based on the first expert model (e.g., linear computation or convolution processing, etc.) to obtain an eighth BEV feature, which is then sent to the third expert model layer. Simultaneously, the second expert model layer may process the fifth BEV feature based on the second expert model (e.g., linear computation or convolution processing, etc.) to obtain a ninth BEV feature, which is then sent to the third expert model layer. Finally, the third expert model layer may process the eighth and ninth BEV features based on the third expert model (e.g., linear computation or convolution processing, etc.) to obtain a sixth BEV feature.
[0188] Still taking the above example, as shown in Figure 11 (Figure 11 is a structural diagram of the hybrid expert layer of the first first fusion unit provided in an embodiment of the present application, and Figure 11 is drawn based on Figure 10), the hybrid expert layer of the first first fusion unit includes a first expert model layer, a second expert model layer, and a third expert model layer (the same is true for the hybrid expert layers of the other first fusion units, which will not be repeated here). In the hybrid expert layer of the first first fusion unit, the first expert model layer can process B5 based on the first expert model (expert) and send the processing result to the third expert model layer. Similarly, the second expert model layer can also process B5 based on the second expert model and send the processing result to the third expert model layer. Then, the third expert model layer can process the two processing results based on the third expert model to obtain B6.
[0189] (1.3.2) In the hybrid expert layer of the first first fusion unit, the first router layer may divide the fifth BEV feature into multiple third sub-features and send each third sub-feature to a fourth expert model layer. Simultaneously, the second router layer may divide the fifth BEV feature into multiple fourth sub-features and send each fourth sub-feature to a fourth expert model layer. Since the number of fourth expert model layers is typically smaller than the number of third sub-features and the number of fourth sub-features, one fourth expert model layer may receive at least one third sub-feature and at least one fourth sub-feature. Multiple fourth expert model layers may then process the multiple third sub-features and the multiple fourth sub-features based on multiple fourth expert models to obtain multiple fifth sub-features, which are then sent to the addition layer. The number of fifth sub-features is typically the same as the number of fourth expert model layers. Finally, the addition layer may add the multiple fifth sub-features to obtain the sixth BVE feature.
[0190] Still as in the above example, as shown in Figure 12 (Figure 12 is another structural diagram of the hybrid expert layer of the first first fusion unit provided in an embodiment of the present application, and Figure 12 is drawn based on Figure 10), the hybrid expert layer of the first first fusion unit includes a first router layer, a second router layer, multiple fourth expert model layers and an addition layer (the same is true for the hybrid expert layers of the other first fusion units, which will not be repeated here). In the hybrid expert layer of the first first fusion unit, the first router layer can divide B5 into sub-features B5,1, ..., B5,m, etc. (m≥2), and send b5,1, ..., b5,m to multiple fourth expert model layers. Similarly, the first router layer can also divide B5 into sub-features b5,m+1, ..., b5,m+k, etc. (k≥2), and send b5,m+1, ..., b5,m+k to multiple fourth expert model layers. Then, the multiple fourth expert model layers can process these sub-features based on the multiple fourth expert models to obtain sub-features b6,1, ..., b6,n, and send b6,1, ..., b6,n to the addition layer. The addition layer can then add b6,1, ..., b6,n to obtain B6.
[0191] More specifically, each first fusion unit may further include a first normalization layer and a second normalization layer (similarly, each second fusion unit may also further include a first normalization layer and a second normalization layer). For example, in the first first fusion unit, the first normalization layer may normalize the third BEV feature to obtain a normalized third BEV feature, and normalize the first BEV feature and / or the second BEV feature to obtain a normalized first BEV feature and / or a normalized second BEV feature. Then, the cross-modal deformable attention layer may process the normalized first BEV feature and / or the normalized second BEV feature based on the deformable attention mechanism based on the normalized third BEV feature to obtain a fourth BEV feature.
[0192] Furthermore, the second normalization layer may normalize the fifth BEV feature to obtain a normalized fifth BVE feature. Then, the hybrid expert layer may process the normalized fifth BEV feature based on the hybrid expert model to obtain a sixth BVE feature.
[0193] Still as in the above example, as shown in Figure 13 (Figure 13 is another structural diagram of the first fusion unit provided in an embodiment of the present application, and Figure 13 is drawn based on Figure 7), the first first fusion unit includes a first normalization layer, a cross-modal deformable attention layer, a first addition layer, a second normalization layer, a mixed expert layer and a second addition layer (the second first fusion unit and the third first fusion unit are also the same, which will not be repeated here). Since the input of the first first fusion unit is B1, B2 and B3, the first normalization layer can first normalize B1, B2 and B3, and obtain the normalized BEV features B'1, B'2 and B'3 accordingly. The cross-modal deformable attention layer can process B'1 and B'2 based on the deformable attention mechanism based on B'3 to obtain the BEV feature B4, and send B4 to the first addition layer. The first addition layer can add B3 and B4 to obtain the BEV feature B5, and send B5 to the second normalization layer. The second normalization layer normalizes B5 to obtain the normalized BEV feature B'5. The mixed expert layer processes B'5 based on the mixed expert model to obtain the BVE feature B6, which is then sent to the second addition layer. The second addition layer adds B5 and B6 to obtain the BEV feature B7, which is then sent to the second first fusion unit.
[0194] It should be understood that in this embodiment, the feature fusion module is only schematically introduced as including multiple first fusion units and multiple second fusion units. In actual applications, the feature fusion module may also include only one first fusion unit. Then, the output of the first fusion unit can be directly used as the feature fusion result.
[0195] It should also be understood that in the hybrid expert model, the number of parallel expert model layers preceding the third expert model layer is the same as the number of prediction heads in the prediction module. This embodiment uses only two prediction heads (e.g., a detection head and a segmentation head) for schematic illustration, so there are two parallel expert model layers preceding the third expert model layer (i.e., the first expert model layer and the second expert model layer). However, in actual applications, there can be more or fewer parallel expert model layers, depending on the number of prediction heads.
[0196] It should also be understood that in the hybrid expert model, the number of parallel router layers is the same as the number of prediction heads in the prediction module. This embodiment uses only two prediction heads (e.g., a detection head and a segmentation head) for schematic illustration, so there are two parallel router layers (i.e., a first router layer and a second router layer). However, in actual applications, there can be more or fewer parallel router layers, depending on the number of prediction heads.
[0197] 504. Based on the feature fusion result, obtain the perception result of the target scene.
[0198] After obtaining the feature fusion results, the target model can further process the feature fusion structure to obtain the perception results of the target scene. At this point, the scene perception of the target scene is completed.
[0199] Specifically, the target model can obtain the perception results of the target scene in the following ways:
[0200] After obtaining the feature fusion results, each prediction head in the prediction module (for example, the detection head and the segmentation head, etc.) can perform a series of processing on the feature fusion results respectively, so as to obtain various prediction results of the target scene (for example, the object detection results of the target scene and the object segmentation results of the target scene, etc.). These prediction results are also the perception results of the target scene.
[0201] In addition, the target models provided in the embodiments of the present application (for example, MetaBEV-T and MetaBEV-C in the first column of Table 1) can be compared with the models provided in the related art whose input is only images (for example, the remaining models other than MetaBEV-T and MetaBEV-C in the first column, such as M2BEV and BEVFormer, etc.). The target models provided in the embodiments of the present application (for example, MetaBEV-T and MetaBEV-C in the second column) can also be compared with the models provided in the related art whose input is only point clouds (for example, the remaining models other than MetaBEV-T and MetaBEV-C in the second column, such as PointPillars and CenterPoint, etc.). The target models provided in the embodiments of the present application (for example, MetaBEV-T and MetaBEV-MTL in the third column) can also be compared with the models provided in the related art whose input is images and point clouds (for example, the remaining models other than MetaBEV-T and MetaBEV-MTL in the third column, such as PointPainting and MVP, etc.). The comparison results are shown in Table 1:
[0202] Table 1
[0203] Furthermore, the target model provided in the embodiment of the present application (for example, MetaBEV in Table 2) can be compared with the models provided by another part of the related art (the input of these models can be a combination of images and point clouds, or only images, or only point clouds, for example, the remaining models except MetaBEV in Table 2, such as TransFusion, etc.), and the comparison results are shown in Table 2:
[0204] Table 2
[0205] Furthermore, when the camera or lidar is interfered with, the target model provided by the embodiment of the present application (for example, MetaBEV in Tables 3 to 7) is compared with the model provided by another related art (for example, BEVFusion in Tables 3 to 7). The comparison results are shown in Tables 3 to 7:
[0206] Table 3
[0207] Table 4
[0208] Table 5
[0209] Table 6
[0210] Table 7
[0211] Based on Tables 1 to 7, it can be seen that the performance of the target model provided by the embodiments of the present application is superior to the performance of the models provided by multiple related technologies.
[0212] In an embodiment of the present application, when scene perception of a target scene is required, the image data of the target scene and / or the point cloud data of the target scene may be obtained first, and the image data and / or the point cloud data may be input into the target model. Next, the target model may first perform feature extraction on the image data and / or the point cloud data, thereby obtaining a first BEV feature of the image data and / or a second BEV feature of the point cloud data. Then, the target model may use a preset third BEV feature to perform feature fusion on the first BEV feature and / or the second BEV feature, thereby obtaining a feature fusion result. Finally, the target model may further process the feature fusion result to obtain a perception result of the target scene. At this point, scene perception of the target scene is completed. In the aforementioned process, the target model can fuse the third BEV feature with the first BEV feature of the target scene's image data to obtain a feature fusion result, or fuse the third BEV feature with the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, or fuse the third BEV feature, the first BEV feature of the target scene's image data, and the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, so as to use the feature fusion result to obtain the scene's perception result. It can be seen from this that there is no strong coupling between the target scene's image data and the target scene's point cloud data input to the target model. Even if, due to certain special circumstances, the target model only obtains the target scene's image data or only obtains the target scene's point cloud data, the target model's final perception result of the target scene can still be highly accurate.
[0213] Furthermore, in an embodiment of the present application, the image data of the target scene input into the target model may be data collected by the camera under interference. Similarly, the point cloud data of the target scene input into the target model may be data collected by the lidar under interference. It can be seen that the image data of the target scene and the point cloud data of the target scene input into the target model may be data of poor quality (data with certain losses), and the target model can still obtain perception results of the target scene with sufficiently high accuracy based on these data.
[0214] The above is a detailed description of the scene perception method provided by the embodiment of the present application. The following is an introduction to the model training method provided by the embodiment of the present application. Figure 14 is a flow chart of the model training method provided by the embodiment of the present application. As shown in Figure 14, the method includes:
[0215] 1401. Acquire image data of a target scene and / or point cloud data of a target scene.
[0216] In this embodiment, when training the training model is required, a batch of training data may be obtained first. The batch of training data includes image data of the target scene and / or point cloud data of the target scene. For the image data of the target scene and / or the point cloud data of the target scene, the actual perception result of the target scene is known.
[0217] In one possible implementation, the point cloud data is data collected when the lidar is interfered with, and the image data is data collected when the camera is interfered with.
[0218] For an introduction to step 1401 , please refer to the relevant description of step 501 in the embodiment shown in FIG5 , which will not be repeated here.
[0219] 1402. The image data and / or point cloud data are processed by the model to be trained to obtain a perception result of the target scene. The model to be trained is used to: extract features from the image data and / or point cloud data to obtain a first BEV feature of the image data and / or a second BEV feature of the point cloud data; perform feature fusion on the first BEV feature and / or the second BEV feature based on a preset third BEV feature to obtain a feature fusion result; and obtain a perception result of the target scene based on the feature fusion result.
[0220] After obtaining the target scene's image data and / or point cloud data, the target scene's image data and / or point cloud data can be input into the model to be trained. The model to be trained can first perform feature extraction on the target scene's image data and / or point cloud data to obtain a first BEV feature for the image data and / or a second BEV feature for the point cloud data. Next, the model to be trained can perform feature fusion on the first BEV feature and / or the second BEV feature based on a preset third BEV feature to obtain a feature fusion result. Finally, the model to be trained can obtain a (predicted) perception result of the target scene based on the feature fusion result.
[0221] In one possible implementation, the model to be trained is used to encode image data and / or point cloud data to obtain a first BEV feature of the image data and / or a second BEV feature of the point cloud data.
[0222] In one possible implementation, the model to be trained is used to: process the first BEV feature and / or the second BEV feature based on a deformable attention mechanism based on a preset third BEV feature to obtain a fourth BEV feature; add the third BEV feature and the fourth BEV feature to obtain a fifth BEV feature; process the fifth BEV feature based on a hybrid expert model to obtain a sixth BVE feature; add the fifth BEV feature and the sixth BEV feature to obtain a seventh BEV feature; and obtain a feature fusion result based on the seventh BVE feature.
[0223] In one possible implementation, the model to be trained is used to: process the preset third BVE feature based on the first multi-layer perceptron to obtain the first position information of the first sub-feature of the first BEV feature and / or the second position information of the second sub-feature of the second BEV feature; obtain the first sub-feature and / or the second sub-feature from the first BEV feature and / or the second BEV feature based on the first position information and / or the second position information; process the third BVE feature based on the second multi-layer perceptron to obtain the first weight information of the first sub-feature of the first BEV feature and / or the second weight information of the second sub-feature of the second BEV feature; and perform weighted summation of the first sub-feature and / or the second sub-feature based on the first weight information and / or the second weight information to obtain the fourth BEV feature.
[0224] In one possible implementation, the model to be trained is used to: process the fifth BEV feature based on the first expert model to obtain the eighth BEV feature; process the fifth BEV feature based on the second expert model to obtain the ninth BEV feature; and process the eighth BEV feature and the ninth BEV feature based on the third expert model to obtain the sixth BEV feature.
[0225] In one possible implementation, the model to be trained is used to: divide the fifth BEV feature into multiple third sub-features; divide the fifth BEV feature into multiple fourth sub-features; process the multiple third sub-features and the multiple fourth sub-features based on multiple fourth expert models to obtain multiple fifth sub-features, wherein the processing based on one fourth expert model corresponds to at least one third sub-feature and at least one fourth sub-feature; and add the multiple fifth sub-features to obtain a sixth BVE feature.
[0226] 1403. Based on the perception results of the target scene, the to-be-trained model is trained to obtain a target model.
[0227] After obtaining the perception result of the target scene, since the actual perception result of the target scene is known, the perception result of the target scene and the actual perception result of the target scene can be calculated through a preset loss function to obtain a target loss, which is used to indicate the difference between the perception result of the target scene and the actual perception result of the target scene. Then, based on the target loss, the parameters of the to-be-trained model can be updated to obtain the to-be-trained model with updated parameters. The next batch of training data can then be used to continue training the to-be-trained model with updated parameters until the model training conditions are met (for example, the target loss reaches convergence, etc.), thereby obtaining the target model in the embodiment shown in FIG5 .
[0228] The target model obtained by training in the embodiment of the present application has a scene perception function. Specifically, when it is necessary to perform scene perception on the target scene, the image data of the target scene and / or the point cloud data of the target scene can be obtained first, and the image data and / or the point cloud data can be input into the target model. Then, the target model can first perform feature extraction on the image data and / or the point cloud data, thereby obtaining the first BEV feature of the image data and / or the second BEV feature of the point cloud data. Then, the target model can use the preset third BEV feature to perform feature fusion on the first BEV feature and / or the second BEV feature, thereby obtaining a feature fusion result. Finally, the target model can further process the feature fusion result to obtain the perception result of the target scene. At this point, the scene perception for the target scene is completed. In the aforementioned process, the target model can fuse the third BEV feature with the first BEV feature of the target scene's image data to obtain a feature fusion result, or fuse the third BEV feature with the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, or fuse the third BEV feature, the first BEV feature of the target scene's image data, and the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, so as to use the feature fusion result to obtain the scene's perception result. It can be seen from this that there is no strong coupling between the target scene's image data and the target scene's point cloud data input to the target model. Even if, due to certain special circumstances, the target model only obtains the target scene's image data or only obtains the target scene's point cloud data, the target model's final perception result of the target scene can still be highly accurate.
[0229] The above is a detailed description of the scene perception method and model training method provided by the embodiment of the present application. The following will introduce the scene perception device and model training device provided by the embodiment of the present application. Figure 15 is a structural schematic diagram of the scene perception device provided by the embodiment of the present application. As shown in Figure 15, the device includes:
[0230] A first acquisition module 1501 is configured to acquire image data and / or point cloud data of a target scene;
[0231] A feature extraction module 1502 is configured to perform feature extraction on the image data and / or the point cloud data to obtain a first BEV feature of the image data and / or a second BEV feature of the point cloud data;
[0232] A feature fusion module 1503 is configured to perform feature fusion on the first BEV feature and / or the second BEV feature based on a preset third BEV feature to obtain a feature fusion result;
[0233] The second acquisition module 1504 is used to acquire the perception result of the target scene based on the feature fusion result.
[0234] In an embodiment of the present application, when scene perception of a target scene is required, the image data of the target scene and / or the point cloud data of the target scene may be obtained first, and the image data and / or the point cloud data may be input into the target model. Next, the target model may first perform feature extraction on the image data and / or the point cloud data, thereby obtaining a first BEV feature of the image data and / or a second BEV feature of the point cloud data. Then, the target model may use a preset third BEV feature to perform feature fusion on the first BEV feature and / or the second BEV feature, thereby obtaining a feature fusion result. Finally, the target model may further process the feature fusion result to obtain a perception result of the target scene. At this point, scene perception of the target scene is completed. In the aforementioned process, the target model can fuse the third BEV feature with the first BEV feature of the target scene's image data to obtain a feature fusion result, or fuse the third BEV feature with the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, or fuse the third BEV feature, the first BEV feature of the target scene's image data, and the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, so as to use the feature fusion result to obtain the scene's perception result. It can be seen from this that there is no strong coupling between the target scene's image data and the target scene's point cloud data input to the target model. Even if, due to certain special circumstances, the target model only obtains the target scene's image data or only obtains the target scene's point cloud data, the target model's final perception result of the target scene can still be highly accurate.
[0235] In one possible implementation, the feature extraction module 1502 is configured to encode the image data and / or the point cloud data to obtain a first BEV feature of the image data and / or a second BEV feature of the point cloud data.
[0236] In one possible implementation, the feature fusion module 1503 is used to: based on a preset third BVE feature, process the first BEV feature and / or the second BEV feature based on a deformable attention mechanism to obtain a fourth BEV feature; add the third BEV feature and the fourth BEV feature to obtain a fifth BEV feature; process the fifth BEV feature based on a hybrid expert model to obtain a sixth BVE feature; add the fifth BEV feature and the sixth BEV feature to obtain a seventh BEV feature; and obtain a feature fusion result based on the seventh BVE feature.
[0237] In one possible implementation, the feature fusion module 1503 is used to: process the preset third BVE feature based on the first multi-layer perceptron to obtain the first position information of the first sub-feature of the first BEV feature and / or the second position information of the second sub-feature of the second BEV feature; obtain the first sub-feature and / or the second sub-feature from the first BEV feature and / or the second BEV feature based on the first position information and / or the second position information; process the third BVE feature based on the second multi-layer perceptron to obtain the first weight information of the first sub-feature of the first BEV feature and / or the second weight information of the second sub-feature of the second BEV feature; and perform weighted summation on the first sub-feature and / or the second sub-feature based on the first weight information and / or the second weight information to obtain the fourth BEV feature.
[0238] In one possible implementation, the feature fusion module 1503 is used to: process the fifth BEV feature based on the first expert model to obtain the eighth BEV feature; process the fifth BEV feature based on the second expert model to obtain the ninth BEV feature; and process the eighth BEV feature and the ninth BEV feature based on the third expert model to obtain the sixth BEV feature.
[0239] In one possible implementation, the feature fusion module 1503 is used to: divide the fifth BEV feature into multiple third sub-features; divide the fifth BEV feature into multiple fourth sub-features; process the multiple third sub-features and the multiple fourth sub-features based on multiple fourth expert models to obtain multiple fifth sub-features, wherein the processing based on one fourth expert model corresponds to at least one third sub-feature and at least one fourth sub-feature; and add the multiple fifth sub-features to obtain a sixth BVE feature.
[0240] In one possible implementation, the point cloud data is data collected when the lidar is interfered with, and the image data is data collected when the camera is interfered with.
[0241] FIG16 is a schematic diagram of the structure of a model training device provided in an embodiment of the present application. As shown in FIG16 , the device includes:
[0242] An acquisition module 1601 is configured to acquire image data of a target scene and / or point cloud data of the target scene;
[0243] Processing module 1602 is configured to process the image data and / or point cloud data using a to-be-trained model to obtain a perception result of the target scene. The to-be-trained model is configured to: perform feature extraction on the image data and / or point cloud data to obtain a first BEV feature of the image data and / or a second BEV feature of the point cloud data; perform feature fusion on the first BEV feature and / or the second BEV feature based on a preset third BEV feature to obtain a feature fusion result; and obtain a perception result of the target scene based on the feature fusion result.
[0244] The training module 1603 is used to train the to-be-trained model based on the perception result of the target scene to obtain a target model.
[0245] The target model obtained by training in the embodiment of the present application has a scene perception function. Specifically, when it is necessary to perform scene perception on the target scene, the image data of the target scene and / or the point cloud data of the target scene can be obtained first, and the image data and / or the point cloud data can be input into the target model. Then, the target model can first perform feature extraction on the image data and / or the point cloud data, thereby obtaining the first BEV feature of the image data and / or the second BEV feature of the point cloud data. Then, the target model can use the preset third BEV feature to perform feature fusion on the first BEV feature and / or the second BEV feature, thereby obtaining a feature fusion result. Finally, the target model can further process the feature fusion result to obtain the perception result of the target scene. At this point, the scene perception for the target scene is completed. In the aforementioned process, the target model can fuse the third BEV feature with the first BEV feature of the target scene's image data to obtain a feature fusion result, or fuse the third BEV feature with the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, or fuse the third BEV feature, the first BEV feature of the target scene's image data, and the second BEV feature of the target scene's point cloud data to obtain a feature fusion result, so as to use the feature fusion result to obtain the scene's perception result. It can be seen from this that there is no strong coupling between the target scene's image data and the target scene's point cloud data input to the target model. Even if, due to certain special circumstances, the target model only obtains the target scene's image data or only obtains the target scene's point cloud data, the target model's final perception result of the target scene can still be highly accurate.
[0246] In one possible implementation, the model to be trained is used to encode image data and / or point cloud data to obtain a first BEV feature of the image data and / or a second BEV feature of the point cloud data.
[0247] In one possible implementation, the model to be trained is used to: process the first BEV feature and / or the second BEV feature based on a deformable attention mechanism based on a preset third BEV feature to obtain a fourth BEV feature; add the third BEV feature and the fourth BEV feature to obtain a fifth BEV feature; process the fifth BEV feature based on a hybrid expert model to obtain a sixth BVE feature; add the fifth BEV feature and the sixth BEV feature to obtain a seventh BEV feature; and obtain a feature fusion result based on the seventh BVE feature.
[0248] In one possible implementation, the model to be trained is used to: process the preset third BVE feature based on the first multi-layer perceptron to obtain the first position information of the first sub-feature of the first BEV feature and / or the second position information of the second sub-feature of the second BEV feature; obtain the first sub-feature and / or the second sub-feature from the first BEV feature and / or the second BEV feature based on the first position information and / or the second position information; process the third BVE feature based on the second multi-layer perceptron to obtain the first weight information of the first sub-feature of the first BEV feature and / or the second weight information of the second sub-feature of the second BEV feature; and perform weighted summation of the first sub-feature and / or the second sub-feature based on the first weight information and / or the second weight information to obtain the fourth BEV feature.
[0249] In one possible implementation, the model to be trained is used to: process the fifth BEV feature based on the first expert model to obtain the eighth BEV feature; process the fifth BEV feature based on the second expert model to obtain the ninth BEV feature; and process the eighth BEV feature and the ninth BEV feature based on the third expert model to obtain the sixth BEV feature.
[0250] In one possible implementation, the model to be trained is used to: divide the fifth BEV feature into multiple third sub-features; divide the fifth BEV feature into multiple fourth sub-features; process the multiple third sub-features and the multiple fourth sub-features based on multiple fourth expert models to obtain multiple fifth sub-features, wherein the processing based on one fourth expert model corresponds to at least one third sub-feature and at least one fourth sub-feature; and add the multiple fifth sub-features to obtain a sixth BVE feature.
[0251] In one possible implementation, the point cloud data is data collected when the lidar is interfered with, and the image data is data collected when the camera is interfered with.
[0252] It should be noted that the information interaction, execution process, etc. between the modules / units of the above-mentioned device are based on the same concept as the method embodiment of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown above in the embodiment of the present application, and no further details will be given here.
[0253] The embodiment of the present application also relates to an execution device, and Figure 17 is a structural diagram of the execution device provided by the embodiment of the present application. As shown in Figure 17, the execution device 1700 can be specifically manifested as a mobile phone, a tablet, a laptop computer, a car computer, an intelligent wearable device, a server, etc., which are not limited here. Among them, the scene perception device described in the embodiment corresponding to Figure 15 can be deployed on the execution device 1700 to implement the function of scene perception in the embodiment corresponding to Figure 5. Specifically, the execution device 1700 includes: a receiver 1701, a transmitter 1702, a processor 1703 and a memory 1704 (wherein the number of processors 1703 in the execution device 1700 can be one or more, and Figure 17 takes one processor as an example), wherein the processor 1703 may include an application processor 17031 and a communication processor 17032. In some embodiments of the present application, the receiver 1701, the transmitter 1702, the processor 1703 and the memory 1704 can be connected via a bus or other means.
[0254] Memory 1704 may include read-only memory and random access memory, and provides instructions and data to processor 1703. A portion of memory 1704 may also include non-volatile random access memory (NVRAM). Memory 1704 stores processor and operation instructions, executable modules, or data structures, or subsets or extended sets thereof. The operation instructions may include various operation instructions for implementing various operations.
[0255] Processor 1703 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together via a bus system. In addition to a data bus, the bus system may also include a power bus, a control bus, and a status signal bus. However, for clarity, all bus systems are referred to as a bus system in the figure.
[0256] The methods disclosed in the above embodiments of the present application can be applied to or implemented by processor 1703. Processor 1703 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in processor 1703. The above processor 1703 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and can further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The processor 1703 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in conjunction with the embodiments of the present application can be directly implemented as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in memory 1704, and processor 1703 reads the information in memory 1704 and, in conjunction with its hardware, completes the steps of the above method.
[0257] Receiver 1701 can be used to receive input digital or character information and generate signal input related to executing device-related settings and function control. Transmitter 1702 can be used to output digital or character information through the first interface. Transmitter 1702 can also be used to send instructions to the disk pack through the first interface to modify data in the disk pack. Transmitter 1702 can also include a display device such as a display screen.
[0258] In an embodiment of the present application, in one case, the processor 1703 is used to obtain the perception result of the target scene through the target model in the embodiment corresponding to Figure 5.
[0259] The present application also relates to a training device. FIG18 is a schematic diagram of the structure of the training device provided by the present application. As shown in FIG18 , the training device 1800 is implemented by one or more servers. The training device 1800 may vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1818 (e.g., one or more processors) and memory 1832, and one or more storage media 1830 (e.g., one or more mass storage devices) storing application programs 1842 or data 1844. The memory 1832 and storage medium 1830 may be temporary storage or permanent storage. The program stored in the storage medium 1830 may include one or more modules (not shown), each module may include a series of instruction operations in the training device. Furthermore, the CPU 1818 may be configured to communicate with the storage medium 1830 to execute the series of instruction operations in the storage medium 1830 on the training device 1800.
[0260] The training device 1800 may also include one or more power supplies 1826, one or more wired or wireless network interfaces 1850, one or more input and output interfaces 1858; or, one or more operating systems 1841, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0261] Specifically, the training device can execute the model training method in the embodiment corresponding to Figure 14.
[0262] An embodiment of the present application also relates to a computer storage medium, which stores a program for signal processing. When the computer storage medium is run on a computer, it enables the computer to execute the steps executed by the aforementioned execution device, or enables the computer to execute the steps executed by the aforementioned training device.
[0263] An embodiment of the present application also relates to a computer program product, which stores instructions that, when executed by a computer, enable the computer to execute the steps executed by the aforementioned execution device, or enable the computer to execute the steps executed by the aforementioned training device.
[0264] The execution device, training device or terminal device provided in the embodiments of the present application can specifically be a chip, and the chip includes: a processing unit and a communication unit, the processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, a pin or a circuit, etc. The processing unit can execute the computer execution instructions stored in the storage unit, so that the chip in the execution device executes the data processing method described in the above embodiment, or so that the chip in the training device executes the data processing method described in the above embodiment. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit can also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0265] Specifically, see Figure 19, which is a schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip can be represented as a neural network processor NPU 1900. NPU 1900 is mounted on the host CPU (host CPU) as a coprocessor and is assigned tasks by the host CPU. The core of the NPU is arithmetic circuit 1903, which is controlled by controller 1904 to extract matrix data from memory and perform multiplication operations.
[0266] In some implementations, the arithmetic circuit 1903 includes multiple processing units (PEs). In some implementations, the arithmetic circuit 1903 is a two-dimensional systolic array. The arithmetic circuit 1903 can also be a one-dimensional systolic array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1903 is a general-purpose matrix processor.
[0267] For example, assume there are input matrix A, weight matrix B, and output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from weight memory 1902 and caches it on each PE in the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from input memory 1901 and performs a matrix operation on matrix B. The partial or final matrix result is stored in accumulator 1908.
[0268] Unified memory 1906 is used to store input and output data. Weight data is directly transferred to weight memory 1902 through the Direct Memory Access Controller (DMAC) 1905. Input data is also transferred to unified memory 1906 through the DMAC.
[0269] BIU stands for Bus Interface Unit 1913 , which is used for interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 1909 .
[0270] The bus interface unit 1913 (BIU) is used for the instruction fetch memory 1909 to obtain instructions from the external memory, and is also used for the storage unit access controller 1905 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
[0271] DMAC is mainly used to transfer input data in the external memory DDR to the unified memory 1906 or to transfer weight data to the weight memory 1902 or to transfer input data to the input memory 1901.
[0272] The vector calculation unit 1907 includes multiple operation processing units. When necessary, it further processes the output of the operation circuit 1903, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / fully connected layer network calculations in neural networks, such as batch normalization, pixel-level summation, and upsampling of the predicted label plane.
[0273] In some implementations, the vector calculation unit 1907 can store the processed output vector to the unified memory 1906. For example, the vector calculation unit 1907 can apply a linear function or a nonlinear function to the output of the operation circuit 1903, such as linear interpolation of the predicted label plane extracted by the convolution layer, or another example of a vector of accumulated values to generate an activation value. In some implementations, the vector calculation unit 1907 generates a normalized value, a pixel-level summed value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 1903, for example, for use in subsequent layers in a neural network.
[0274] An instruction fetch buffer 1909 connected to the controller 1904 is used to store instructions used by the controller 1904;
[0275] Unified memory 1906, input memory 1901, weight memory 1902, and instruction fetch memory 1909 are all on-chip memories. External memories are private to the NPU hardware architecture.
[0276] The processor mentioned in any of the above places can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the above program.
[0277] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
[0278] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special circuits, etc. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application 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 readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.
[0279] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0280] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a training device or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
Claims
1. A scene perception method, characterized in that: The method is implemented by a target model, and the method comprises: Acquire image data of a target scene or point cloud data of the target scene; Performing feature extraction on the image data or the point cloud data to obtain a first bird's-eye view BEV feature of the image data or a second BEV feature of the point cloud data; Based on a preset third BEV feature, performing feature fusion on the first BEV feature or the second BEV feature to obtain a feature fusion result; Based on the feature fusion result, a perception result of the target scene is obtained.
2. The method according to claim 1, characterized in that The extracting features of the image data or the point cloud data to obtain the first BEV feature of the image data or the second BEV feature of the point cloud data comprises: The image data or the point cloud data is encoded to obtain a first BEV feature of the image data or a second BEV feature of the point cloud data.
3. The method according to claim 1 or 2, characterized in that: The step of performing feature fusion on the first BEV feature or the second BEV feature based on the preset third BEV feature to obtain a feature fusion result includes: Based on a preset third BVE feature, the first BEV feature or the second BEV feature is processed based on a deformable attention mechanism to obtain a fourth BEV feature; adding the third BEV characteristic and the fourth BEV characteristic to obtain a fifth BEV characteristic; Processing the fifth BEV feature based on the hybrid expert model to obtain a sixth BVE feature; adding the fifth BEV characteristic and the sixth BEV characteristic to obtain a seventh BEV characteristic; Based on the seventh BVE feature, a feature fusion result is obtained.
4. The method according to claim 3, characterized in that The first BEV feature or the second BEV feature is processed based on the deformable attention mechanism based on the preset third BVE feature to obtain the fourth BEV feature, including: Processing the preset third BVE feature based on the first multi-layer perceptron to obtain first position information of a first sub-feature of the first BEV feature or second position information of a second sub-feature of the second BEV feature; Based on the first position information or the second position information, acquiring the first sub-feature or the second sub-feature from the first BEV feature or the second BEV feature; Processing the third BVE feature based on a second multi-layer perceptron to obtain first weight information of a first sub-feature of the first BEV feature or second weight information of a second sub-feature of the second BEV feature; Based on the first weight information or the second weight information, a weighted sum is performed on the first sub-feature or the second sub-feature to obtain a fourth BEV feature.
5. The method according to claim 3 or 4, characterized in that: The processing of the fifth BEV feature based on the hybrid expert model to obtain the sixth BVE feature includes: Processing the fifth BEV feature based on the first expert model to obtain an eighth BEV feature; Processing the fifth BEV feature based on the second expert model to obtain a ninth BEV feature; The eighth BEV feature and the ninth BEV feature are processed based on the third expert model to obtain a sixth BEV feature.
6. The method according to claim 3 or 4, characterized in that: The processing of the fifth BEV feature based on the hybrid expert model to obtain the sixth BVE feature includes: dividing the fifth BEV feature into a plurality of third sub-features; dividing the fifth BEV feature into a plurality of fourth sub-features; Processing the plurality of third sub-features and the plurality of fourth sub-features based on a plurality of fourth expert models to obtain a plurality of fifth sub-features, wherein the processing based on one fourth expert model corresponds to at least one third sub-feature and at least one fourth sub-feature; The multiple fifth sub-features are added together to obtain a sixth BVE feature.
7. The method according to any one of claims 1 to 6, characterized in that: The point cloud data is data collected when the laser radar is interfered with, and the image data is data collected when the camera is interfered with.
8. A model training method, characterized in that: The method comprises: Acquire image data of a target scene or point cloud data of the target scene; The image data or the point cloud data is processed by a model to be trained to obtain a perception result of the target scene, and the model to be trained is used to: extract features from the image data or the point cloud data to obtain a first BEV feature of the image data or a second BEV feature of the point cloud data; based on a preset third BEV feature, perform feature fusion on the first BEV feature or the second BEV feature to obtain a feature fusion result; based on the feature fusion result, obtain a perception result of the target scene; Based on the perception result of the target scene, the model to be trained is trained to obtain a target model.
9. The method according to claim 8, characterized in that The model to be trained is used for: The image data or the point cloud data is encoded to obtain a first BEV feature of the image data or a second BEV feature of the point cloud data.
10. The method according to claim 8 or 9, characterized in that: The model to be trained is used for: Based on a preset third BVE feature, the first BEV feature or the second BEV feature is processed based on a deformable attention mechanism to obtain a fourth BEV feature; adding the third BEV characteristic and the fourth BEV characteristic to obtain a fifth BEV characteristic; Processing the fifth BEV feature based on the hybrid expert model to obtain a sixth BVE feature; adding the fifth BEV characteristic and the sixth BEV characteristic to obtain a seventh BEV characteristic; Based on the seventh BVE feature, a feature fusion result is obtained.
11. The method according to claim 10, characterized in that The model to be trained is used for: Processing the preset third BVE feature based on the first multi-layer perceptron to obtain first position information of a first sub-feature of the first BEV feature or second position information of a second sub-feature of the second BEV feature; Based on the first position information or the second position information, acquiring the first sub-feature or the second sub-feature from the first BEV feature or the second BEV feature; Processing the third BVE feature based on a second multi-layer perceptron to obtain first weight information of a first sub-feature of the first BEV feature or second weight information of a second sub-feature of the second BEV feature; Based on the first weight information or the second weight information, a weighted sum is performed on the first sub-feature or the second sub-feature to obtain a fourth BEV feature.
12. The method according to claim 10 or 11, characterized in that: The model to be trained is used for: Processing the fifth BEV feature based on the first expert model to obtain an eighth BEV feature; Processing the fifth BEV feature based on the second expert model to obtain a ninth BEV feature; The eighth BEV feature and the ninth BEV feature are processed based on the third expert model to obtain a sixth BEV feature.
13. The method according to claim 10 or 11, characterized in that: The model to be trained is used for: dividing the fifth BEV feature into a plurality of third sub-features; dividing the fifth BEV feature into a plurality of fourth sub-features; Processing the plurality of third sub-features and the plurality of fourth sub-features based on a plurality of fourth expert models to obtain a plurality of fifth sub-features, wherein the processing based on one fourth expert model corresponds to at least one third sub-feature and at least one fourth sub-feature; The multiple fifth sub-features are added together to obtain a sixth BVE feature.
14. The method according to any one of claims 8 to 13, characterized in that: The point cloud data is data collected when the laser radar is interfered with, and the image data is data collected when the camera is interfered with.
15. A scene perception device, characterized in that: The device comprises a target model, and the device comprises: A first acquisition module, used to acquire image data of a target scene or point cloud data of the target scene; A feature extraction module, used for performing feature extraction on the image data or the point cloud data to obtain a first BEV feature of the image data or a second BEV feature of the point cloud data; A feature fusion module, configured to perform feature fusion on the first BEV feature or the second BEV feature based on a preset third BEV feature to obtain a feature fusion result; The second acquisition module is used to acquire the perception result of the target scene based on the feature fusion result.
16. A model training device, characterized in that: The device comprises: An acquisition module, used to acquire image data of a target scene or point cloud data of the target scene; A processing module, used for processing the image data or the point cloud data through a model to be trained to obtain a perception result of the target scene, wherein the model to be trained is used for: performing feature extraction on the image data or the point cloud data to obtain a first BEV feature of the image data or a second BEV feature of the point cloud data; performing feature fusion on the first BEV feature or the second BEV feature based on a preset third BEV feature to obtain a feature fusion result; and obtaining a perception result of the target scene based on the feature fusion result; The training module is used to train the model to be trained based on the perception result of the target scene to obtain a target model.
17. A scene perception device, characterized in that: The device includes a memory and a processor; the memory stores codes, and the processor is configured to execute the codes. When the codes are executed, the scene perception device executes the method according to any one of claims 1 to 14.
18. A computer storage medium, characterized in that The computer storage medium stores one or more instructions, which, when executed by one or more computers, enable the one or more computers to implement the method of any one of claims 1 to 14.
19. A computer program product, characterized in that The computer program product stores instructions, which, when executed by a computer, enable the computer to implement the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Scene perception method and related equipment thereof
CN116597402A
Multi-source perception data fusion identification method and system and computer readable storage medium
CN113255779A
Bird-eye view feature generation method based on multi-modal fusion
CN115578705A
Three-dimensional single target tracking method based on multi-modal information fusion
CN115880333A
Target detection method and system based on image and point cloud fusion
CN115965842A
Cited By
3D target detection method based on instance-scene fusion enhancement
CN120107536A
Online vector map construction method based on hybrid expert model and relation coding
CN122486594A
