A BEV semantic segmentation model training method, system, device and medium based on knowledge distillation
By optimizing the BEV semantic segmentation model using the knowledge distillation algorithm, the problems of complex network structure and high computational and storage overhead in multi-camera fusion are solved, achieving lightweight and efficient semantic segmentation results.
Patent Information
- Application Number
- CN202211340027.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-29
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-10-29
AI Technical Summary
Existing BEV perception technology models have complex network structures, cumbersome training and annotation, and high computational and storage overhead when using multi-camera fusion. They also lack lightweight, high-performance, and efficient real-time application solutions.
The knowledge distillation algorithm is adopted, using ResNet18 as the student model and ResNet101 as the teacher model to perform feature extraction and probability distribution set transformation, and optimize the student model to obtain a lightweight target semantic segmentation model.
It achieves more accurate semantic segmentation, improves the performance and accuracy of the model, and reduces the complexity of the network and the computational and storage requirements.
Smart Images

Figure CN115690416B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of automatic driving, and particularly relates to a BEV semantic segmentation model training method, system, device and medium based on knowledge distillation. BACKGROUND
[0002] With the wide popularity of vehicle-mounted cameras in modern vehicles, the detection and recognition of various targets encountered during vehicle driving based on vehicle-mounted visual sensors has become mature, and plays an important role in current assisted driving and future automatic driving, and becomes an indispensable core technology for high-end intelligent modern vehicles. Multi-camera fusion is to fuse vehicle-mounted multi-view camera images to construct a bird's eye view (BEV) from top to bottom in the vehicle coordinate system, covering an area of dozens to hundreds of meters around the vehicle, and the function is to facilitate the driver to obtain the vehicle environment in the bird's eye view through perspective conversion, thereby improving the control ability of the vehicle.
[0003] BEV perception technology has been widely concerned by the academic circle and started rapid development since 2020, and most BEV perception algorithm models have complex network structure, tedious training annotation process, low timeliness, and large calculation and storage overhead when processing multi-camera data. Therefore, as of now, there is no mainstream computing framework with sufficient influence and meeting the real-time application of vehicle end, and the model structure is still in high-speed iteration and continuous subversion, and there are still many problems such as lightweight, high performance and high efficiency to be solved before its mature application.
[0004] The existing technology includes extracting the features of each voxel based on laser radar point cloud data, which can accelerate the semantic segmentation of point cloud network. However, this method has high replaceability, and there are many networks that can be used to replace the simplified PointNet for acceleration. At the same time, cameras have wider application, higher economy and higher stability than laser radars; the semantic segmentation of bird's eye view based on multi-camera fusion has higher application value. SUMMARY
[0005] In view of the above-mentioned shortcomings of the prior art, the application provides a BEV semantic segmentation model training method based on knowledge distillation, which solves the technical problem that there is no research on multi-camera fusion bird's eye view semantic segmentation based on knowledge distillation in the industry at present, and the knowledge distillation algorithm is simple and efficient, which is a lossless model optimization method and can obtain a more accurate semantic segmentation model.
[0006] The application provides a BEV semantic segmentation model training method based on knowledge distillation, which comprises the following steps: acquiring an image dataset; inputting the image dataset into a student model to extract features and obtaining a first planar view dataset; inputting the image dataset into a teacher model to extract features and obtaining a second planar view dataset; converting the first planar view dataset and the second planar view dataset according to the spatial coordinates of the image data in the image dataset, and obtaining a first BEV view dataset and a second BEV view dataset; extracting features from the first BEV view dataset and the second BEV view dataset and predicting probability output, and obtaining a first probability distribution set and a second probability distribution set; optimizing the student model according to the first probability distribution set and the second probability distribution set, and taking the optimized student model as a target semantic segmentation model.
[0007] According to an embodiment of the application, the student model adopts a Resnet18 neural network model; and the teacher model adopts a Resnet101 neural network model.
[0008] According to an embodiment of the application, the step of extracting features from the first BEV view dataset and the second BEV view dataset and predicting probability output to obtain a first probability distribution set and a second probability distribution set comprises the following steps: inputting the first BEV view dataset into a BEV feature extraction network to extract features and obtaining a first feature view dataset; inputting the second BEV view dataset into the BEV feature extraction network to extract features and obtaining a second feature view dataset; and classifying the first feature view dataset and the second feature view dataset through a convolution layer of a convolutional neural network to obtain the corresponding first probability distribution set and second probability distribution set.
[0009] According to an embodiment of the application, the BEV feature extraction network adopts a Resnet18 neural network model.
[0010] According to an embodiment of the application, the step of optimizing the student model according to the first probability distribution set and the second probability distribution set and taking the optimized student model as a target semantic segmentation model comprises the following steps: calculating a difference value of the first probability distribution set and the second probability distribution set through a loss function; calculating a reverse gradient value of the difference value and optimizing the network weight of the trained student model to obtain the target semantic segmentation model.
[0011] According to an embodiment of the application, the step of calculating a reverse gradient value of the difference value and optimizing the network weight of the trained student model to obtain the target semantic segmentation model comprises the following steps: weighting the difference value according to a preset mask label; and calculating a reverse gradient value of the weighted difference value.
[0012] A semantic segmentation method based on any one of the above BEV semantic segmentation models, comprising: acquiring image data to be segmented; inputting the image data to be segmented into a semantic segmentation model to obtain intermediate data; threshold filtering the intermediate data to obtain a corresponding semantic segmentation result.
[0013] A BEV semantic segmentation model training system based on knowledge distillation, comprising: an information acquisition module that acquires an image data set; a first information processing module that is configured to input the image data set into a student model to extract features and obtain a first planar view data set, and is further configured to input the image data set into a teacher model to extract features and obtain a second planar view data set; a second information processing module that is configured to convert the first planar view data set and the second planar view data set according to the spatial coordinates of the image data in the image data set to obtain a first BEV view data set and a second BEV view data set; a third information processing module that is configured to extract features from the first BEV view data set and the second BEV view data set and predict probability outputs to obtain a first probability distribution set and a second probability distribution set; and a model optimization module that is configured to optimize the student model according to the first probability distribution set and the second probability distribution set, and use the optimized student model as a target semantic segmentation model.
[0014] An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of the above methods when executing the computer program, or the processor implements the semantic segmentation method of the above semantic segmentation method when executing the computer program.
[0015] A computer readable medium having instructions stored thereon, wherein the instructions are loaded and executed by a processor to implement the method of any one of the above methods, or the computer program is executed by the processor to implement the semantic segmentation method of claim 7.
[0016] The technical effect of the present application is that the BEV semantic segmentation model training method based on knowledge distillation fills the gap in the field of multi-camera fusion semantic segmentation knowledge distillation in the prior art. At the same time, the semantic segmentation model optimized based on the knowledge distillation algorithm achieves better performance and precision, and the network model is more lightweight.
[0017] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0018] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application. It is to be understood that the drawings are designed solely for purposes of illustration to be used in conjunction with the description in
[0019] Figure 1 is a flowchart of a specific embodiment of a BEV semantic segmentation model training method based on knowledge distillation provided by the present application;
[0020] Figure 2 is a flowchart of a specific embodiment of a BEV semantic segmentation method based on the semantic segmentation model provided by the present application;
[0021] Figure 3 is a flowchart of a specific embodiment of a BEV semantic segmentation model training system based on knowledge distillation provided by the present application;
[0022] Figure 4 is a structural schematic diagram of a specific embodiment of an electronic device provided by the present application. DETAILED DESCRIPTION
[0023] The embodiments of the present application will be described hereinafter with reference to the accompanying drawings and preferred embodiments, and other advantages and effects of the present application can be easily understood by those skilled in the art from the contents disclosed in the present specification. The present application can also be implemented or applied in other different specific embodiments, and each detail in the present specification can be modified or changed based on different views and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for illustrating the present application, but not for limiting the protection scope of the present application.
[0024] It should be noted that the diagrams provided in the following embodiments only schematically illustrate the basic concept of the present application, and only the components related to the present application are shown in the diagrams, but not the number, shape and size of the components when actually implemented. The type, number and ratio of each component when actually implemented can be arbitrarily changed, and the layout type of the components can also be more complex.
[0025] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application, however, it is obvious for those skilled in the art that the embodiments of the present application can be implemented without these specific details, and in other embodiments, the known structures and devices are shown in the form of block diagrams instead of details, to avoid making the embodiments of the present application difficult to understand.
[0026] First, it needs to be explained that in order for the personnel in this technical field to better understand the application scheme, the technical solutions in the embodiments of the application are described clearly and completely.
[0027] Knowledge distillation (KD) is a common method of model compression. Unlike pruning and quantization in model compression, knowledge distillation is to build a lightweight small model, use the output information of a large model with better performance to supervise the training of the small model, so that the small model achieves better performance and accuracy. The large model is usually called the teacher model (Teacher Model), and the small model is usually called the student model (Student Model). The supervision information from the Teacher model output is called knowledge, and the process of Student learning to transfer the supervision information from Teacher is called distillation. In simple terms, a large and bloated but knowledgeable and efficient "teacher network" transfers specific domain knowledge to a "student network" through precise conversion, allowing the "student network" to perform well in a certain aspect and be less bloated, similar to "model compression". For example, a picture of a horse can be identified as a donkey or a car. Through the training of hard targets, the picture is input into the model for identification, and a soft target can be obtained. From the soft target, it can be seen that the probability of a horse is relatively large, the probability of identifying a donkey is relatively small, and the probability of identifying a car is also relatively small. Similarly, the correlation between a horse and a donkey is relatively small, and the correlation between a horse and a car is also relatively small. Similarly, the similarity between a donkey and a car is very small. Therefore, soft targets can deliver more information, and soft targets can be used to train student networks. Soft target contains more "knowledge" and "information" like who, unlike who, how much like, how much unlike, especially the relative size of the probability of non-correct categories (donkey and car).
[0028] Therefore, we need to let the teacher network output the soft target of the hard target training as the input of the student network to train the student network. At the same time, the output of the soft target is not enough "soft", so it needs to be processed and a distillation temperature T is added. T is used in the softmax function to correct the softness of the output label.
[0029] First, the teacher network and the student network are both subjected to a softmax added with a distillation temperature T, and a loss evaluation is performed on the two, which is called disiliation loss. This process is for the student network to simulate the prediction result of the teacher network. The student network also uses a softmax without adding the distillation temperature T to perform a calculation, and then a loss calculation is performed on the result and the hard label, which is called student loss. This part is for the student network to simulate the true result. The final loss function is the weighted sum of the disiliation loss and the student loss.
[0030] Knowledge distillation has a covering effect. For example, when training the student network, the dog category is not used, but the teacher network is trained with this category. After completing knowledge transfer, it is found that the student network can also recognize the dog category. Because in the distillation process, the teacher network transfers the features it has learned to the student network, and the student network also learns new knowledge from it. (Similar to a teacher giving a lesson to a student. Although the student has never seen a real plane, the teacher has seen it and has described many details about the plane to the student. When the student sees the plane, he can also distinguish the plane) (zero-shot learning).
[0031] Although the student network and the teacher network have very similar effects, the student network is more lightweight. It needs to use a smaller data set to train the network, effectively preventing overfitting. If a regular network is trained with 100%, a model can be trained. If 3% of the data is used to retrain the model, it will be found that the accuracy is high during training, but the test accuracy is low, and overfitting occurs. However, if 3% of the data is placed in the student network, overfitting will not occur.
[0032] At present, in the field of semantic segmentation technology, there are semantic segmentation through image semantic information and point cloud information, semantic segmentation through 3D point cloud, and semantic segmentation based on attention mechanism. There is a gap in knowledge distillation. Based on the knowledge distillation algorithm, the teacher model optimizes the student model, and the optimized student model is used as a semantic segmentation model. The semantic segmentation model optimized by the knowledge distillation algorithm is more accurate, and the semantic segmentation label is closer to the image.
[0033] It should be noted that the semantic segmentation method based on the semantic model provided in the embodiments of the present application is generally executed by a vehicle-mounted terminal to perform semantic segmentation on image data collected by a vehicle-mounted camera.
[0034] Embodiment 1
[0035] Please refer to Figure 1As shown, a BEV semantic segmentation model training method based on knowledge distillation includes:
[0036] Step S110, acquiring image data.
[0037] Specifically, the image data set collected by the vehicle-mounted multi-camera is used as the training data set.
[0038] Step S120, inputting the image data set into a student model for feature extraction to obtain a first planar view data set.
[0039] Step S130, inputting the image data set into a teacher model for feature extraction to obtain a second planar view data set.
[0040] Among them, the feature data in the image data set for training is extracted, so as to filter out the interference information in the image. Further, in the embodiment of the present application, the student model adopts a Resnet-18 neural network model.
[0041] Deep residual network (Deep residual network, ResNet), ResNet is developed and optimized on the basis of Alexnet, and the advantage of residual neural network is identity mapping. The problem of AlexNet is that with the increase of the number of layers, the optimization steps back. ResNet is to introduce residual to alleviate the phenomenon of gradient disappearance / explosion. At the same time, the network layer of ResNet reaches 152 layers, and the biggest advantage of residual neural network compared with traditional VGG neural network is that it introduces identity mapping to solve the degradation problem caused by too high layer number by calculating residual.
[0042] In the field of lightweight neural networks for semantic segmentation tasks, nonlinear activation layers can introduce nonlinearity into the model, giving it stronger fitting capabilities. However, this can also cause low-dimensional data to collapse, meaning that some of the low-dimensional features are lost or destroyed when passing through the ReLU layer in MobileNet V2. Although some information can be recovered, it cannot be fully restored. ReLU is essentially a filter, but its scope is not the frequency domain in signal processing, but the feature domain, i.e., dimension compression. Low-dimensional data passing through a nonlinear activation layer will collapse (information loss), while high-dimensional data will not. Low-dimensional features have a small probability of being distributed to the activation band of ReLU, so information loss is severe and may even be complete. High-dimensional features have a high probability of being distributed to the activation band of ReLU, so although some information may be lost, most of the information is still preserved. Moreover, the information killed by ReLU may be useless information (redundant information). Low-dimensional data is actually in this situation: the likelihood of high redundancy is low, and if we force nonlinear activation (dimension compression) on it, we may lose useful information or even all information (output all 0s).
[0043] Unlike nonlinear activation layers, linear activation layers do not compress the dimension of the feature space. Therefore, we can derive a principle for using activation layers: use nonlinear activation (such as ReLU) for data containing redundant information, and use linear activation (such as some linear transformations) for data without redundant information. These two types of activation are used alternately and flexibly to balance nonlinearity and information integrity. Since redundant information and non-redundant information carry the same amount of useful information, it is best to use memory-intensive structures for non-redundant information when selecting a network. However, ResNet essentially does one thing: reducing the redundancy of information in the data. Specifically, it uses linear activation for non-redundant information (obtaining the identity part without redundancy through skip connection) and nonlinear activation for redundant information (extracting useful information from the remaining part of identity through ReLU, which is the residual). The extraction of identity is the core of ResNet.
[0044] ResNet-18, where the number 18 represents the depth of the network, specifies 18 layers with weights, including convolutional layers and fully connected layers, excluding pooling layers and BN layers.
[0045] Preferably, the embodiment of the application selects a ResNet neural network model with relatively low precision as the student model.
[0046] In the embodiment of the application, the teacher model adopts a ResNet-101 neural network model. Since the student model needs to be optimized according to the teacher model to obtain the target semantic segmentation model, a ResNet-101 with higher precision is selected as the teacher model to extract features from the image data used for training.
[0047] In step S140, the first and second planar view data sets are converted according to the spatial coordinates of the image data in the image data set to obtain the first and second BEV view data sets.
[0048] Specifically, the spatial coordinates of the bird's eye view in the image data are projected onto the obtained planar view data according to the intrinsic and extrinsic parameters of the vehicle-mounted multi-camera, and the first and second BEV view data sets, i.e., the spatial view data, are obtained through a bilinear interpolation algorithm.
[0049] The bilinear interpolation, also known as bilinear interpolation, is a linear interpolation extension of an interpolation function with two variables. The core idea is to perform linear interpolation in two directions respectively. As an interpolation algorithm in numerical analysis, bilinear interpolation is widely used in signal processing, digital image and video processing, etc.
[0050] In step S150, the first and second BEV view data sets are subjected to feature extraction and probability output prediction to obtain the first and second probability distribution sets.
[0051] The specific step process is as follows:
[0052] The first and second BEV view data sets are input into the BEV feature extraction network for feature extraction to obtain the first and second feature view data sets. Since the image is converted from planar data to spatial data, the feature data needs to be extracted again to filter out the interference information in the image. The BEV feature extraction network also adopts a ResNet-18 neural network model.
[0053] The obtained first and second feature view data sets are then input into the convolution layer of the convolutional neural network for classification to obtain the first and second probability distribution sets corresponding to the image data.
[0054] The soft label required by the student model is generated by calculating the difference between the first probability distribution set and the second probability distribution set, i.e., the disiliation loss in the knowledge distillation algorithm. This process is the student network simulating the prediction results of the teacher network.
[0055] In step S160, the student model is optimized according to the first probability distribution set and the second probability distribution set, and the optimized student model is used as the target semantic segmentation model.
[0056] The specific steps are as follows:
[0057] The loss function is calculated by combining the mean square error loss function and the relative entropy loss function to calculate the difference between the first probability distribution set and the second probability distribution set corresponding to the student model and the teacher model, i.e., the disiliation loss in the knowledge distillation algorithm. At the same time, according to the task requirements, the preset mask label is added to weight the difference, and the weighted difference L is calculated as follows:
[0058]
[0059] where s(x i ) represents the probability distribution output by the student model, i.e., the first probability distribution set, t(x i ) represents the probability distribution output by the teacher model, i.e., the second probability distribution set. w k , w m represent the combined weight proportion of the relative entropy loss function and the mean square error loss function, respectively, M t represents the weighting value of the labeled mask label as positive and negative samples. N is the number of images in the image data set used for training.
[0060] Finally, the weighted difference is calculated by the backpropagation algorithm to obtain the soft label required by the student model. The network weight parameters of the student model are optimized according to the soft label, and the optimized student model is used as the target semantic segmentation model.
[0061] It should be noted that the steps of the above methods are only for clear description, and can be combined into one step or split into multiple steps in implementation, as long as the same logical relationship is included, and all are within the protection scope of the patent; adding irrelevant modifications or introducing irrelevant designs in the algorithm or process, but not changing the core design of the algorithm and process are within the protection scope of the patent.
[0062] Embodiment 2
[0063] Please refer to Figure 2 The application embodiment also provides a semantic segmentation method based on the above BEV semantic segmentation model, which comprises:
[0064] Step S210, obtaining image data to be segmented
[0065] Step S220, inputting the image data to be segmented into a semantic segmentation model to obtain intermediate data
[0066] Step S230, threshold filtering the intermediate data to obtain a corresponding semantic segmentation result.
[0067] Embodiment 3
[0068] Please refer to Figure 3 The embodiment of the present application also provides a BEV semantic segmentation model training system based on knowledge distillation, which comprises:
[0069] An information collection module 10 is configured to obtain an image data set;
[0070] A first information processing module 20 is configured to input the image data set into a student model to extract features and obtain a first planar view data set; and input the image data set into a teacher model to extract features and obtain a second planar view data set;
[0071] A second information processing module 30 is configured to convert the first planar view data set and the second planar view data set according to the spatial coordinates of the image data in the image data set to obtain a first BEV view data set and a second BEV view data set;
[0072] A third information processing module 40 is configured to extract features from the first BEV view data set and the second BEV view data set and predict probability outputs to obtain a first probability distribution set and a second probability distribution set;
[0073] A model optimization module 50 is configured to optimize the student model according to the first probability distribution set and the second probability distribution set, and use the optimized student model as a target semantic segmentation model.
[0074] It should be noted that the BEV semantic segmentation model training system based on knowledge distillation provided in the above embodiment and the semantic segmentation model training method based on knowledge distillation provided in Embodiment 1 belong to the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiment, which will not be repeated here. The semantic segmentation model training method based on knowledge distillation provided in Embodiment 1 can allocate the above functions to different functional modules according to the actual application, i.e., divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited herein.
[0075] Embodiment 4
[0076] See Figure 4 As shown in the accompanying drawings, the embodiments of the present application also provide an electronic device, comprising a memory 2, a processor 1 and a computer program stored in the memory and executable in the processor, wherein the processor executes the computer program to implement the steps of the method according to any one of the preceding embodiments.
[0077] The memory comprises at least one type of readable storage medium, such as flash memory, mobile hard disk, multimedia card, card-type memory (e.g. SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory can be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory can also be an external storage device of the electronic device, such as a plug-in mobile hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. installed in the electronic device. Further, the memory can comprise both the internal storage unit and the external storage device of the electronic device. The memory can be used to store application software and various data installed in the electronic device, and also to temporarily store data that has been output or will be output.
[0078] The processor can be composed of integrated circuits in some embodiments, such as a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more combinations of central processing unit (CPU), microprocessor, digital processing chip, graphics processor and various control chips, etc. The processor is the control unit of the electronic device, which connects various components of the electronic device through various interfaces and lines, and executes programs or modules stored in the memory and calls data stored in the memory to perform various functions and process data of the electronic device.
[0079] The processor executes the operating system and various application programs installed in the electronic device. The processor executes the application programs to implement the steps in the method embodiments.
[0080] For example, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present application. The one or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the electronic device.
[0081] The integrated unit in the form of the software function module can be stored in a computer readable storage medium. The software function module is stored in a storage medium and includes a plurality of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute part of the functions of the lithium battery false welding detection method according to the embodiments of the present application.
[0082] In conclusion, the technical effect of the present application is that the BEV semantic segmentation model training method based on knowledge distillation fills the gap in the field of multi-camera fusion semantic segmentation knowledge distillation research in the prior art. At the same time, the semantic segmentation model optimized based on the knowledge distillation algorithm achieves better performance and precision, and the network model is more lightweight.
[0083] The above embodiments only exemplarily illustrate the principles and effects of the present application, and are not intended to limit the present application. Any person skilled in the art can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical concept disclosed by the present application should be covered by the claims of the present application.
Claims
1. A training method for a BEV semantic segmentation model based on knowledge distillation, characterized in that, include: Obtain the image dataset; The image dataset is input into the student model for feature extraction to obtain the first planar view dataset; The image dataset is input into the teacher model for feature extraction to obtain the second planar view dataset; The first planar view dataset and the second planar view dataset are transformed based on the spatial coordinates of the image data in the image dataset to obtain the first BEV view dataset and the second BEV view dataset. Feature extraction and probability prediction are performed on the first BEV view dataset and the second BEV view dataset to obtain a first probability distribution set and a second probability distribution set. The student model is optimized based on the first probability distribution set and the second probability distribution set, and the optimized student model is used as the target semantic segmentation model.
2. The BEV semantic segmentation model training method according to claim 1, characterized in that, The student model uses the ResNet18 neural network model; the teacher model uses the ResNet101 neural network model.
3. The BEV semantic segmentation model training method according to claim 1, characterized in that, The step of extracting features from the first BEV view dataset and the second BEV view dataset and predicting probability outputs to obtain a first probability distribution set and a second probability distribution set includes: The first BEV view dataset is input into the BEV feature extraction network for feature extraction to obtain the first feature view dataset. The second BEV view dataset is input into the BEV feature extraction network for feature extraction to obtain the second feature view dataset. The first feature view dataset and the second feature view dataset are classified by the convolutional layers of a convolutional neural network to obtain the corresponding first probability distribution set and second probability distribution set.
4. The BEV semantic segmentation model training method according to claim 3, characterized in that, The BEV feature extraction network uses the ResNet18 neural network model.
5. The BEV semantic segmentation model training method according to claim 1, characterized in that, The step of optimizing the student model based on the first probability distribution set and the second probability distribution set, and using the optimized student model as the target semantic segmentation model, includes: The difference between the first probability distribution set and the second probability distribution set is calculated using a loss function; Calculate the back gradient value of the difference value and optimize the network weights of the trained student model to obtain the target semantic segmentation model.
6. The BEV semantic segmentation model training method according to claim 5, characterized in that, The steps of calculating the back gradient value of the difference value and optimizing the network weights of the trained student model to obtain the target semantic segmentation model include: The difference values are weighted according to preset mask labels; Calculate the reverse gradient value of the weighted difference.
7. A semantic segmentation method based on the BEV semantic segmentation model according to any one of claims 1 to 6, characterized in that, include: Obtain the image data to be segmented; The image data to be segmented is input into the semantic segmentation model to obtain intermediate data; The intermediate data is threshold filtered to obtain the corresponding semantic segmentation results.
8. A training system for a BEV semantic segmentation model based on knowledge distillation, characterized in that, include: The information acquisition module obtains the image dataset; The first information processing module is used to input the image dataset into the student model for feature extraction to obtain the first planar view dataset; It is also used to input the image dataset into the teacher model for feature extraction to obtain a second planar view dataset; The second information processing module is used to transform the first planar view dataset and the second planar view dataset according to the spatial coordinates of the image data in the image dataset to obtain the first BEV view dataset and the second BEV view dataset. The third information processing module is used to extract features from the first BEV view dataset and the second BEV view dataset and predict probability outputs to obtain a first probability distribution set and a second probability distribution set. The model optimization module is used to optimize the student model based on the first probability distribution set and the second probability distribution set, and to use the optimized student model as the target semantic segmentation model.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6, or the processor executes the computer program to implement the semantic segmentation method according to claim 7.
10. A computer-readable medium, characterized in that, It stores instructions that are loaded by a processor and executed as described in any one of claims 1 to 6, or that the computer program implements the semantic segmentation method as described in claim 7 when executed by a processor.
Citation Information
Patent Citations
Scene aerial view reconstruction method and system combining visual depth information and semantic segmentation
CN113936139A
Electronic device, system and method for determining a semantic grid of an environment of a vehicle
WO2020053611A1